Skip to content

Instantly share code, notes, and snippets.

@holybit
Created June 7, 2013 21:30
Show Gist options
  • Save holybit/5732554 to your computer and use it in GitHub Desktop.
Save holybit/5732554 to your computer and use it in GitHub Desktop.
Putting my shell config files into a git repo. Repo is in my home directory. Want to ignore everything but a few files. Files in .ssh/ giving me trouble. Can't seem to figure out how to ignore knows hosts and a few others. Ideas?
# Ignore everything
/*
# But not these files...
!/.*alias
!/.bashrc*
!/.perltidyrc
!/.func
!/.pcmrc
!/.ssh/
# I want to ignore the known hosts files but this does not seem to work
/.ssh/known_hosts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment