Skip to content

Instantly share code, notes, and snippets.

@trey
Created May 18, 2012 03:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trey/2722922 to your computer and use it in GitHub Desktop.
Save trey/2722922 to your computer and use it in GitHub Desktop.
Temporarily ignore a file in Git

Temporarily ignore a file in Git

Sometimes you want to temporarily ignore a file in a Git repository without throwing it out entirely by putting it in .gitignore. Here's how to do it:

$ git update-index --assume-unchanged [filename]

To start tracking changes again:

$ git update-index --no-assume-unchanged [filename]

Source

@trey
Copy link
Author

trey commented May 18, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment