Using GIT’s exclude file to include certain files ONLY

You can turn the .git/info/exclude on its head to only include certain files / directories. Start by excluding everything, then negating the succeeding rules.

*
!foo.*
!bar
This entry was posted in Git. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">