forked from Fryguy/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
62 lines (62 loc) · 1.93 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
[user]
email = [email protected]
name = Jason Frey
signingkey = A9EB12497632AA7B
[color]
ui = auto
diff = auto
[core]
excludesfile = ~/.gitignore_global
pager = less -FX
attributesfile = ~/.gitattributes
[merge]
renamelimit = 99999
[fetch]
prune = true
[pull]
rebase = true
[push]
default = simple
[status]
short = true
branch = true
[grep]
lineNumber = true
[diff]
algorithm = patience
[diff "gpg"]
textconv = gpg --no-tty --decrypt --quiet
[rebase]
autosquash = true
[help]
autocorrect = 1
[rerere]
enabled = 1
[alias]
lg = log --graph --pretty=format:\"%C(auto)%h -%d %s %C(green)(%cr) %C(cyan)<%an>%C(reset)\"
mr = "!f(){ git fetch --force --update-head-ok ${2:-upstream} merge-requests/$1/head:mr-$1 && git checkout mr-$1; };f"
pr = "!f(){ git fetch --force --update-head-ok ${2:-upstream} pull/$1/head:pr-$1 && git checkout pr-$1; };f"
squash = "!f(){ git reset --soft HEAD~${1} && git commit --edit -m\"$(git log --format=%B --reverse HEAD..HEAD@{1})\"; };f"
block-push = "!git remote set-url --push ${1:upstream} \"\""
restore-push = "!git remote set-url --push ${1:upstream} $(git remote get-url ${1:upstream})"
# via https://stackoverflow.com/a/30998048/2355944
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'"
[log]
follow = true
[commit]
gpgsign = true
template = ~/.stCommitMsg
[branch]
sort = -committerdate
[advice]
detachedHead = false
[include]
path = ~/.gitconfig_platform
path = ~/.gitconfig_tokens
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/Sourcetree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true