opposite of .gitignore file? [duplicate]

You can include !-lines to whitelist files: a .gitignore with:

*
!included/

will exclude all, but the ‘included/’ directory

Note that if you want files matching a pattern to be un-ignored, in subdirectories, you will need to prevent the containing directories from getting ignored too. This should not pose a large problem, since git doesn’t actually track directories, only files (identified by a repository path).

Example:

*
!*/
!SOURCES

will ignore everything, except SOURCES in subdirectories.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)