Last active
June 28, 2022 08:13
-
-
Save pikatenor/f30fedc77602c2d075e4927cde94eb7c to your computer and use it in GitHub Desktop.
.gitconfig Ailiases
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] | |
a = add | |
ap = add -p | |
cl = clone | |
co = checkout | |
cob = checkout -b | |
c = commit | |
cv = commit -v | |
cam = commit --amend | |
cp = cherry-pick | |
d = diff -b | |
dc = diff --cached -b | |
m = merge | |
k = push | |
pushsh = push -u origin HEAD | |
fpush = push --force-with-lease | |
j = pull | |
s = status -s | |
l = log --graph --date=short --decorate=short --pretty=format:'%Cgreen%h %Creset%cd\n%Cblue%cn %Cred%d %Creset%s' | |
logg = log --stat --graph --decorate=full | |
loggg = log --stat --graph --format=fuller | |
logdiff = log -p -b -5 | |
grep = grep -n | |
reset-file = checkout HEAD | |
bakuha = reset --hard | |
rename-branch = branch -m | |
iranai-origin-branch-kesu = fetch --prune | |
iranai-merged-branch-kesu = "!f () { br={1:-master}; git co $br; git branch --merged | egrep -v '\\*|master|develop|main' | xargs git branch -d; }; f" | |
root = rev-parse --show-toplevel | |
root-relative = rev-parse --show-cdup | |
fire = ! git cob "ptnr-fire-$(date +%s)" && cd $(git root) && git a -A && git c --no-verify -m 'FIRE! EXIT BUILDING NOW!' && git pushsh | |
com = master | |
master = "!f () { br=$(git branch --format='%(refname:short)' | grep -E 'main|master'); echo -e \"Selected primary branch is \\033[01m$br\\033[00m.\"; git co $br; }; f" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment