Evan Shelhamer <shelhamer@xxxxxxxxxxxxxxxxxxx> writes: > (in repo on your branch) > mkdir test_dir > touch test_dir/.gitkeep > touch test_file > git add * > git commit -m "test commit (with directory)" > > Will commit the directory as expected in your branch, and when you go > to checkout another branch it will not exist. ... unless you have untracked files in test_dir/, that is. If the branch you are switching to does not have anything at test_dir, you will not lose the untracked file because git does not remove test_dir/ nor its untracked contents. Depending on what you have at the path "test_dir" in the branch you are switching to, the actual rules are a bit more subtle than that, though. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html