Last active
December 8, 2021 14:41
-
-
Save arnaudcourtecuisse/3573304e8347dff57a1948397892a191 to your computer and use it in GitHub Desktop.
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 = Arnaud Courtecuisse | |
[alias] | |
cfg = !code ~/.gitconfig | |
ignore = "!ignore() { while [ -n \"$1\" ]; do echo $1 >> .gitignore; shift; done }; ignore" | |
br = branch | |
d = diff --ignore-all-space | |
ds = diff --staged | |
aa = add --all | |
ap = add --all --patch | |
ia = add --intent-to-add | |
cm = commit -m | |
cam = commit --amend -m | |
fix = commit --no-edit --amend | |
co = checkout | |
l = log --oneline | |
st = status | |
p = push | |
pp = !git push -u origin $(git rev-parse --abbrev-ref HEAD) | |
pf = push --force-with-lease | |
fom = fetch origin main:main | |
rbm = rebase main | |
rbs = "rbs() { git rebase --onto=main origin/$1; }; rbs" | |
rb = "!rb() { git fom && { [ -z "$1" ] && git rbm || git rbs $1; }; }; rb" | |
login = !git-wip login | |
logout = !git-wip logout | |
prunesq = !git checkout -q main && git for-each-ref refs/heads/ "--format=%(refname:short)" | while read branch; do mergeBase=$(git merge-base master $branch) && [[ $(git cherry master $(git commit-tree $(git rev-parse $branch\^{tree}) -p $mergeBase -m _)) == "-"* ]] && git branch -D $branch; done | |
[core] | |
excludesfile = /home/arnaud/.gitignore | |
[init] | |
defaultBranch = main | |
[pull] | |
ff = only |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment