So I have a git repository. I'm using git 1.7.9 running under Cygwin/Windows 8.
This git repository has this weird behavior so that it thinks that some subdirectories of a certain directory is tracked, but the actual directory containing them is not.
So, I get weirdness like this:
$ git reset --hard
$ git status
#untracked files
foo
$ git clean -fd
removing foo
$ git status
#changes not staged
D foo/bar/whatever.txt
But then, going the other way and adding the files:
$ git add foo
$ git status
# changes not staged
A foo/bar/whatever.txt
And if I commit from there, then it will of course put out crazy conflicts when trying to push.
Occasionally a git reset --hard
fixes it, but sometimes not. I've found the best way to get rid of it is to check out a new branch, delete everything in my working copy and run git reset --hard
.
Has anyone else ever experienced this weird behavior? I'm using git-tfs, which may mean this is a bug in that, but it is, for the most part, a regular git repository, so I don't think that matters.