I have a branch2 who's source is branch1 and renamed a directory originating from branch1. When checking out branch1 the renamed directory remains present but is not marked as an unstaged modification. The renamed directory is of course not present as a commit on branch1. Why is this occurring?
Asked
Active
Viewed 2,117 times
4
-
1Is there anything in the directory? Git does not track directories, only files and their path. Git might not remove the directory but all the files in it when you checkout branch1. – gzm0 Aug 05 '13 at 22:36
1 Answers
3
The said directory hierarchy never contained a file leaf which means it was not actually tracked by git.

MetaChrome
- 3,210
- 6
- 31
- 48
-
I wish there was some way to fix this, override the behavior, etc. Ant sometimes looks at empty directories and tries to build them. I don't see an option for that. – Mark Bennett Dec 05 '13 at 01:30
-
Ah, there is a fix, use the command "git clean -fd", found in this answer http://stackoverflow.com/a/1499824/295802 – Mark Bennett Dec 05 '13 at 01:37