GitGui on Windows: Show empty directories

378 Views Asked by At

I think git does not track empty directories by default, but is there any way to make it track them?

I have two empty directories that I would like to be included with a project "images" and "plugins" but both directories are empty by default.

Is there anyway to get this to show up in GitGui so I can commit the empty directories?

I looked at something with a flag of --no-empty-directory, but that didn't seem to do anything. I added it to my exclude file that is in the .git directory of the root of the project folder.

2

There are 2 best solutions below

0
On BEST ANSWER

I would just mark them by putting in empty .gitignore files in each.

0
On

I think the idea for GIT is track content. So the empty directory for GIT means nothing. You may have to us something under that directory and try to hide them by some way. Link on linux, you can put "DOT" before you file name like .foo as a work around.