Make GIT Ignore Everything Except A Few Files

Posted By Weston Ganger

I wanted to add all of my dot files to a repository and wanted to only add some of the files in my home folder.

All you have to do is edit your .gitignore file:

# .gitignore

# ignore all files

# except these files
!.gitignore # make sure you add this

Related External Links:

Article Topic:Software Development - Linux

Date:August 23, 2015