Last active
July 18, 2025 07:13
-
-
Save bmsrox/c34e097d0cdfb16c820b7be3ad8a30ae to your computer and use it in GitHub Desktop.
Git config aliases
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
b = branch | |
s = status -s | |
c = !git add --all && git commit -m | |
l = log --pretty=format:'[%C(blue)%h%C(white)]%C(red)%d %C(white)%s -> %C(cyan)%cn, %C(green)%cr' | |
lg = log --all --decorate --oneline --graph --pretty=format:'[%C(blue)%h%C(white)]%C(red)%d %C(white)%s -> %C(cyan)%cn, %C(green)%cr' | |
amend = !git add --all && git commit --amend --no-edit | |
#git count feat/fix/chore | |
count = !git shortlog -s --grep | |
find = "!f(){ git branch | grep $1; }; f" | |
st = !git add --all && git stash | |
sw = "!f(){ git find $1 | xargs git switch; }; f" | |
sws = "!f(){ git st && git find $1 | xargs git switch; }; f" | |
co = "!f(){ git find $1 | xargs git switch; }; f" | |
cos = "!f(){ git st && git find $1 | xargs git checkout; }; f" | |
#p = "!f(){ echo Are you sure you want to run git push? [y/N]; read a; if [ $a = y ] || [ $a = Y ]; then git push; else echo Command push canceled.; fi;}; f" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment