On Tue, 2019-07-30 at 10:48 -0400, Asher Gordon wrote:
> From the man pages git-mv(1) and git-rm(1), it looks like it is
> possible to move files and directories and remove files. But it
> wasn't clear whether or not you could remove directories. Do you know
> if this is possible?

Git doesn't actually control directories.  It only controls files. 
Directories are created if a Git controlled file exists in it, and they
aren't created (by Git) if there's no Git controlled file in it.

So simply removing all files in a directory will cause the directory to
no longer be created when you check out the commits where those files
don't exist.

It does mean that you can't add an empty directory to Git.  This is
very rarely an issue.


Reply via email to