Last active
March 17, 2023 02:43
-
-
Save ErikGranse/30e4500b507d21f341eda2e12ba6d970 to your computer and use it in GitHub Desktop.
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
[alias] | |
rekt = reset --hard | |
tidy = !git remote prune origin && git branch -vv | grep ':gone]' | awk '{print }' | xargs git branch -D | |
unwatch = update-index --assume-unchanged | |
watch = update-index --no-assume-unchanged | |
unwatched = "!git ls-files -v | grep '^[[:lower:]]'" | |
watchall = "!git unwatched | xargs -L 1 -I % sh -c 'git watch `echo % | cut -c 2-`'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
git rekt
is pretty obvious.git tidy
removes all local refs to branches that have been removed upstream.unwatch
will cause Git ignore changes in tracked files;watch
removes that restriction. Note that areset --hard
will causeunwatch
ed files to be reset.unwatched
lists all files affected byunwatch
. The*watch*
aliases weren't written by me, but I forget where I found them. Will add credit if I find it.