tags:

views:

94

answers:

2

It's possible that I'm not really understanding how git works here, but I have a "master" git branch, and then I created a new branch called "refresh."

I switched to the "refresh" branch, made a ton of changes, file additions, etc, and then switched back to the "master" branch to make some other changes to that branch.

When I did a 'git status' on the master branch, it showed all of the file changes and additions I had made to the 'refresh' branch.

(Note this is all happening on my local dev server...I haven't pushed any of this stuff.)

Shouldn't my master branch have retained all the original files and none of the file additions? Or am I just not understanding how git works?

+6  A: 

If you didn't commit the changes to "refresh", they'll be still littering the workplace. Perhaps you forgot to do that before checking out master again?

Tordek
Thanks Tordek...that was indeed the issue.
Shpigford
+1  A: 

I have had something like that happen to a coworker recently. It took us a while before we found out that his brain-dead editor was to blame. He still had those files opened in the editor and when he switched branches, the editor decided that it should write the files back to disk and not reload the changed versions.

innaM