git: listing directories to include
In its normal behaviour, git is for a whole directory, apart from exclusions via .gitignore, and any special git files.
What if we want to whitelist what to include? There isn't a .gitfoo file for this. But it can probably be achieved via a double negative for files, and a double negative twice for directories:
.gitignore:
*
!included_file
!included_dir/
!included_dir/
!included_dir/*
This is especially useful for picking out parts of a home directory to replicate.
Comments
Post a Comment