Skip to content

Instantly share code, notes, and snippets.

@donnfelker donnfelker/config
Last active Jul 11, 2018

Embed
What would you like to do?
Watch or Unwatch a file in git
# 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
@overengineered

This comment has been minimized.

Copy link

commented Feb 7, 2017

Thanks! Useful addition:

# List files that are temporarily untracked. 
# usage: git ignored
ignored = !git ls-files -v | grep "^[[:lower:]]"
@stkent

This comment has been minimized.

Copy link

commented Apr 7, 2017

# 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
You can’t perform that action at this time.