Last active
June 20, 2021 17:08
-
-
Save LeandroBarral/b4a06401bd7413300e68 to your computer and use it in GitHub Desktop.
gitconfig
This file contains hidden or 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] | |
sts = status -s | |
st = !git fetch && git status | |
cm = commit | |
co = checkout | |
am = commit --amend --no-edit | |
w = whatchanged | |
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%C(62)\\ [%cn]\\ %ce" --decorate | |
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%C(62)\\ [%cn]\\ %ce" --decorate --numstat | |
cls = clean -xdf | |
local-branches = !git branch -vv | cut -c 3- | awk '$3 !~/\\[/ { print $1 }' | |
alias = "!sh -c '[ $# = 2 ] && git config --global alias.\"$1\" \"$2\" && exit 0 || echo \"usage: git alias <new alias> <original command>\" >&2 && exit 1' -" | |
boom = reset --hard | |
mt = mergetool | |
b = "!f() { git checkout -b $1; git push -u origin $1; }; f" | |
db = "!f() { git push origin :$1; git branch -D $1; }; f" | |
dbco = "!sh -c '[ $# = 2 ] && git push origin :$1 && git checkout $2 && git branch -D $1 && exit 0 || echo \"usage: git dbco <branchNameToDelete> <branchToCheckoutAfterDelete>\" >&2 && exit 1' -" | |
bo = "!f() { git for-each-ref --format='%(color:cyan)%(authordate:format:%m/%d/%Y %I:%M %p) %(align:25,left)%(color:yellow)%(authorname)%(end) %(color:reset)%(refname:strip=3)' --sort=authordate refs/remotes; }; f" | |
bp = "!f() { git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -d; }; f" | |
pushall = !git remote | xargs -L1 git push --all | |
[color] | |
diff = auto | |
interactive = auto | |
status = auto | |
ui = true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment