Last active
May 16, 2022 19:02
-
-
Save rubberduck203/526f9d4a64ed97f674c8c0fa50b50c44 to your computer and use it in GitHub Desktop.
Git Aliases
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] | |
fuckit = reset HEAD | |
update = commit --amend --no-edit | |
fix = !git add -A && git commit --amend --no-edit | |
lg = log --color --graph --abbrev-commit --pretty=oneline | |
rstat = !git fetch && git status | |
# del-merged = !git branch --merged master | grep -v "master" | xargs git branch -d | |
# refresh = !git fetch -p && git pull && git del-merged | |
# wrap in an "anonymous" function so we can pass arguments | |
# this makes it easier to work with repos where the trunk is named `main` | |
del-merged = "!f() { git branch --merged ${1-master} | grep -v " ${1-master}$" | xargs -r git branch -d; }; f" | |
refresh = "!f() { git pull --prune && git del-merged $1;}; f" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment