This surprises me and I can't think of how it can be possible.
git checkout -b newbranch.- commit some files other than
Foo.java. git checkout master(which was the original branch I was on) gives error:error: Your local changes to the following files would be overwritten by checkout:
Foo.java Please, commit your changes or stash them before you can switch branches.
git stashgit checkout master
And it auto-merges successfully. Why did it need to auto-merge at all? Why did it need to block my git checkout going away from master but not back to master? I'm trying to understand the logic for when git makes these complaints.
Foo.javawhile on the other branch?git statusandgit diff Foo.javato be sure.