How can I add an empty directory to a Git repository

De openkb
Aller à : Navigation, rechercher

Sommaire

Questions

How can I add an empty directory (that contains no files) to a Git repository?

Answers

Another way to make a directory stay empty (in the repository) is to create a .gitignore file inside that directory that contains four lines:

# Ignore everything in this directory
*
# Except this file
!.gitignore

Then you don t have to get the order right the way that you have to do in m104 s solution.

Source

License : cc by-sa 3.0

http://stackoverflow.com/questions/115983/how-can-i-add-an-empty-directory-to-a-git-repository

Related

Outils personnels
Espaces de noms

Variantes
Actions
Navigation
Outils