2

I have the craziest bug going on with my repo I don't know what to do. In my repo I have three branches.

master > branch_1 > branch_2

From branch_1

git status and all is clear no files are staged or modified.

From branch_2

git checkout branch_2 and type

git status again and all of a sudden I have these two files that are marked as modified

What I've tried

I try to do a git checkout on both these files but they keep re-appearing as modified automatically

Only special setup: The only thing special about these files is that they are part of a git subtree repo within this repo.

What's going on here?

OS windows 8.1

git version 1.9.4.msysgit.0

user391986
  • 29,536
  • 39
  • 126
  • 205

2 Answers2

2

I would sanity check that you don't have the files open somewhere else on your computer. A code editor may be saving a cached copy of the file in memory. Once you're sure you have nothing open, you can start looking into other options:

  • run git stash pop - maybe the files had been stashed at some point with git stash and now it's a few commits ahead and behaving buggy
  • you could always try git reset --hard which should throw away all uncommitted changes.
DrewT
  • 4,983
  • 2
  • 40
  • 53
2

Check for:

Those are the two reason which usually lead to "differences" on a checkout.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250