Skip to content

Instantly share code, notes, and snippets.

@przor3n
Created January 6, 2016 20:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save przor3n/beb98100d8e618c698af to your computer and use it in GitHub Desktop.
Save przor3n/beb98100d8e618c698af to your computer and use it in GitHub Desktop.
Git - ignore local files
The .git/info/exclude file has the same format as any .gitignore file. Another option is to set core.excludesFile to the name of a file containing global patterns.
Note, if you already have unstaged changes you must run the following after editing your ignore-patterns:
git update-index --assume-unchanged [<file>...]
Note on $GIT_DIR: This is a notation used all over the git manual simply to indicate the path to the git repository. If the environment variable is set, then it will override the location of whichever repo you're in, which probably isn't what you want.
Link: http://stackoverflow.com/questions/1753070/git-ignore-files-only-locally
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment