-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgitconfig
More file actions
19 lines (16 loc) · 746 Bytes
/
gitconfig
File metadata and controls
19 lines (16 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# vim: set filetype=gitconfig:
[url "git@github.com:"]
pushInsteadOf = https://github.com/
[commit]
verbose = true
[alias]
clear-branches=!"\
tmp=$(mktemp) \
&& (git config --get-all delbranch.ignore > \"$tmp\" || true) \
&& (git branch --merged | grep -v -e '+' -e '*' | grep -v -f \"$tmp\" | xargs git branch --delete) \
&& rm \"$tmp\""
# https://stackoverflow.com/a/30998048
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 -s | uniq -f1 -d | sort -n | tail -1 | cut -f2'"
show-merge = "!sh -c 'merge=$(git find-merge $0 $1) && [ -n \"$merge\" ] && git show $merge'"
[core]
quotepath = true