-
Notifications
You must be signed in to change notification settings - Fork 1
/
gitconfig
33 lines (33 loc) · 1.49 KB
/
gitconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
[pull]
rebase = true
[push]
default = simple
[merge]
ff = false
[rebase]
autosquash = true
[credential]
helper = osxkeychain
[alias]
branch-cleanup = "!git branch --merged | egrep -v \"(^\\*|master|dev)\" | xargs git branch -d #"
current-branch = rev-parse --abbrev-ref HEAD
diff-origin = "!sh -c 'git diff origin/$(git current-branch)'"
find-merge = "!sh -c 'commit=$0 && branch=${1:-HEAD} && (git rev-list $commit..$branch --ancestry-path | cat -n; git rev-list $commit..$branch --first-parent | cat -n) | sort -k2 | uniq -f1 -d | sort -n | tail -1 | cut -f2'"
lg1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
push-and-set-upstream = "!git push -u origin $(git current-branch)"
upstream-and-open-pr = "!git push --progress -u origin $(git current-branch) 2>&1 | tee /dev/tty | egrep -o 'https?://[^ ]+' | xargs -I {} open {}"
show-merge = "!sh -c 'merge=$(git find-merge $0 $1) && [ -n \"$merge\" ] && git show $merge'"
tago = tag --sort=committerdate
update-and-rebase-with-master = "!sh -c 'git update-master && git rebase master'"
update-master = fetch origin master:master
update-with-master = pull --rebase origin master
checkout-previous-branch = checkout @{-1}
[include]
# configs that are different in each machine
path = .gitconfig_local
[core]
excludesfile = ~/.gitignore
[fetch]
prune = true
[commit]
gpgsign = true