Skip to content

Instantly share code, notes, and snippets.

@karki-dennis
Created February 16, 2018 04:26
Show Gist options
  • Save karki-dennis/9c4a959e4a89369c43aaad636adf8c9a to your computer and use it in GitHub Desktop.
Save karki-dennis/9c4a959e4a89369c43aaad636adf8c9a to your computer and use it in GitHub Desktop.
# Goes in your .git/config file
[alias]
# Temporarily stop tracking a file in git.
# usage: git unwatch path/to/file
unwatch = update-index --assume-unchanged
# Resume tracking a file in git.
# usage: git watch path/to/file
watch = update-index --no-assume-unchanged
Or
git update-index --assumed-changed path/to/file
git update-index --no-assumed-changed path/to/file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment