views:

46

answers:

1

Hey all - I'm still learning the ropes of Git (love it!) but the other day I noticed some behavior I just do not understand. We have, in essence, three folders that got moved into the repository at different times (one immediately after we created the repo, one a little while later, and one just recently). Recently, I had to get some code out of an old revision. I used

git checkout <old SHA1 hash>

to pull up one of our first checkins, when I noticed Git showed the old folder (as it should), as well as the newest folder (which got added to the repo long after the checked out commit was made). But it did not show the second folder.

What would cause Git to display the newest folder with the old revision?

+5  A: 

There are probably untracked files (auto saves, hidden files, etc) in the folder. Git doesn't want to kill your untracked files, so it won't remove the directory they live in.

kwatford
Aha - exactly! I had placed some compiled files into Git's ignore list, so they weren't showing up as "untracked" -- they weren't showing up at all! Thanks for the reply!
ConnorG