Last active
October 14, 2020 16:36
-
-
Save GaetanoPiazzolla/3715ea8836154a84a545b97f62769300 to your computer and use it in GitHub Desktop.
The best GIT aliases ever
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
[user] | |
name = gpiazzolla | |
email = gae.xx@gmail.com | |
[alias] | |
search = ! git branch -a | sed '/->/d' | sed 's/\\*//' | xargs git grep -n -I | |
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short | |
last = log -1 head | |
rehard = reset --hard | |
branches = branch -la | |
rank = shortlog -sn --no-merges | |
emergency = "!f() { git checkout -b "emergency" && git add . && git commit -m \"fixed issue\" && git push; }; f" | |
cleanup = "!f() { git branch --merged ${1:-master} | egrep -v \"(^\\*|${1:-master})\" | xargs --no-run-if-empty git branch -d; };f" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Each alias is well explained here: https://medium.com/@gae.piaz/addictive-git-aliases-e001f30416d1