Created
November 13, 2019 21:02
-
-
Save alexsavio/75cd51401efc9dedf523a6483071bc5e to your computer and use it in GitHub Desktop.
.gitconfig
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] | |
co = checkout | |
br = branch | |
ci = commit | |
st = status | |
unstage = reset HEAD -- | |
undo = reset --soft HEAD~1 | |
last = log -1 HEAD | |
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%C | |
reset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --branches | |
filter-deleted = "!sh -c 'git log --diff-filter=D --summary | grep delet | |
e'" | |
delete-merged = "!f() { \ | |
git checkout --quiet master \ | |
&& \ | |
git branch --merged \ | |
| \ | |
grep --invert-match '\\*' \ | |
| \ | |
xargs -n 1 git branch --delete; \ | |
git checkout --quiet @{-1} \ | |
; \ | |
}; f" | |
delete-merged-remote = "!f() { \ | |
git checkout --quiet master \ | |
&& \ | |
git branch --remote --merged \ | |
| \ | |
grep --invert-match 'master' \ | |
| \ | |
xargs -n 1 echo \ | |
| \ | |
awk '{ sub(/origin\\//, \"\"); print }' \ | |
| \ | |
xargs -I {} git push origin :{} \ | |
; \ | |
}; f" | |
delete-local-tags = tag -l | tag -d | |
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short | |
changelog = log --pretty=%s --first-parent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment