git: add alias and change default push branch

This commit is contained in:
Mathieu Maret 2020-03-17 21:13:59 +01:00
parent e7b99972b1
commit ad4d92310e
1 changed files with 6 additions and 2 deletions

View File

@ -36,7 +36,8 @@
rbi = !sh -c \"git rebase -i `git merge-base $1 HEAD`\" -
cleanbr = remote prune origin
cleanbrshow = remote prune origin --dry-run
cleanupbr = "!git branch --merged | grep -v '\\*\\|master\\|develop' | xargs -n 1 git branch -d"
cleanupbr = "!git branch --merged | grep -v '\\*\\|master\\|develop\\|dev' | xargs -n 1 git branch -d"
cleanupbrprune = "!git fetch --prune"
contains = !sh -c 'git branch -a --contains $1' -
wdiff = diff --word-diff=color --unified=1
first = rev-list --max-parents=0 HEAD # or use log --reverse
@ -58,6 +59,8 @@
git reset --hard $REMOTE/master >/dev/null 2>&1; \
git checkout - >/dev/null 2>&1; \
}; f"
code-changes = "!git log --format=format: --name-only | egrep -v '^$' | sort | uniq -c | sort -rg | head -10"
cc = "!git code-changes"
[branch]
#New branch track remote
#autosetupmerge = always
@ -107,7 +110,8 @@
# tool = vimdiff
# conflictstyle = diff3
[push]
default = simple
default = current #push to upstreal assuming same name for the upstream and current branch
#default = upstream # pushed to the configuer upstream branch
[credential]
helper = cache --timeout=3600
[sendemail]