Harmless Git weirdness: git rm -r does not delete physical files, but doesn't list them as untracked either
Somehow, in git 1.6, after running git rm -r example to get rid of a directory (called example), it leaves the files there but from then on ignores them. git status lists nothing, ls shows the directory example is still there, and then rm -rf example removes the directory and git status still shows nothing. Not sure how long this effect will last but if you, like me, trust git to let you know what is tracked or untracked – what is there – with the exception of things explicitly put into the .gitignore file, then you will want to run git rm -r example; rm -rf example as one command or immediately after one another, simply to keep matters neat and clean, and not introduce git ghosts.
If you have an empty folder (or a whole nested set of empty folders!) that git just doesn't seem to know about, whether you remove folders or add them back, your problem is likely that the directory and all in it was git rm'd (by you or someone you pulled from).
Git does not remove folders from your working copy when it removes them from the repository. So when you git pull, all the files in the folder are deleted, but the folders are still there. Which, incidentally, is lame.
Comments
Post new comment