git and local modifications

Posted by user362073 on Stack Overflow See other posts from Stack Overflow or by user362073
Published on 2010-06-09T05:34:48Z Indexed on 2010/06/09 5:42 UTC
Read the original article Hit count: 244

Filed under:

Hi

I am discovering how to use git.

I just made the following test:

  1. create a folder and 2 files
  2. then git init, git add ., git commit -m "initial commit"
  3. create a branch: git branch experimental, git checkout experimental
  4. then change the name of the folder and delete one of the files, then git add ., git commit -m "experimental"
  5. go back to master: git checkout master

    Surprise: I do not find the master as I left it; the folder has disappeared. And I have to do a git -reset --hard to find my folder.

    I wonder if I did something wrong or if I have not understood how git manages local changes. Thanks for your help.

© Stack Overflow or respective owner

Related posts about git