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
!.bashrc
!.vimrc
!.ssh/*


Related External Links:

Article Topic:Software Development - Linux

Date:August 23, 2015

Recommended Posts

Contact

604-309-8713
info@solidfoundationwebdev.com

Send Me A Message

I would love to get in touch and talk about your next project. Feel free to send a message and I will get back to you shortly.

Get Connected