Last active
November 19, 2019 11:28
-
-
Save donnfelker/5e919828c889e5e82173929cb53969be to your computer and use it in GitHub Desktop.
Watch or Unwatch a file in git
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
# List files that are temporarily untracked.
# usage: git ignored
ignored = !git ls-files -v | grep "^[[:lower:]]" | cut -c3-
piggy-backs off the above and cleans up the output to include filename only :o)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks! Useful addition: