I thought I already had a decent understanding of Git, but now I was surprised. I thought that branches would isolate changes from other industries, so I started a lot of experimental refactoring in a new industry. This refactoring involves moving many files. When I switched to the wizard, I could still see the changes!
I went to my inbox to replicate the problem:
$ git branch crazy-refactoring
$ git checkout crazy-refactoring
$ rm README
$ git checkout master
$ git status
no changes added to commit (use "git add" and/or "git commit -a")
$ ls README
ls: cannot access README: No such file or directory
Why? My whole goal is to create a branch so that I can try something and throw it away if it doesn’t work out. Toughts?
source
share