-
Notifications
You must be signed in to change notification settings - Fork 20
/
gitconfig
121 lines (94 loc) · 2.83 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
[alias]
### Short names for typing efficiency ###
aa = add --all
aliases = !git config --list | grep alias | cut -c 7- | sort
ap = add --patch
ca = commit --amend
ci = commit
co-pr = !sh -c 'git fetch origin pull/$1/head:pr/$1 && git switch pr/$1' -
coi = checkout-interactive
# See https://haacked.com/archive/2017/10/22/gitcoin/
coin = !git log --pretty=format:'%H %ad %an' | sort | head -n1
cp = cherry-pick
dmb = delete-merged-branches
done = !git checkout $(git default-branch) && git pull && git delete-merged-branches --yes
ignored = !git status --short --ignored | grep "\\!\\!" | cut -c 4-
graph = log --graph --decorate --pretty=oneline --abbrev-commit --all
pr = !gh pr create
re = restore
root = rev-parse --show-toplevel
st = status --branch --short
su = submodule update --init --recursive
sw = switch
up = !git fetch origin && git rebase origin/master
### Long names for pseudo-commands ###
# Returns true if in a Git repo; false otherwise
in-repo = !sh -c '[ -d .git ] || git rev-parse --git-dir &> /dev/null' -
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = !git rev-parse --abbrev-ref HEAD
# Push the current branch to the remote "origin", set it to track
# the upstream branch, and display the URL to use to submit a PR if in a
# GitHub-backed repository
publish = !sh -c 'git push -u origin $(git branch-name)' -
# Delete the remote version of the current branch
unpublish = !git push origin :$(git branch-name)
[branch]
autoSetupMerge = always
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
[color "status"]
added = green # Items that have been added to the index
changed = yellow # Items that have been changed, but not added to the index
untracked = red # Items that are untracked
[commit]
template = ~/.gitmessage
gpgsign = true
[core]
editor = code --wait
excludesfile = ~/.gitignore
autocrlf = input
pager = diff-so-fancy | less --tabs=4 -RFX
[credential]
helper = osxkeychain
helper =
helper = /usr/local/share/gcm-core/git-credential-manager
[diff]
tool = Kaleidoscope
[difftool "Kaleidoscope"]
cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
[difftool]
prompt = false
[fetch]
prune = true
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
required = true
process = git-lfs filter-process
[github]
user = lee-dohm
[gpg]
program = /usr/local/bin/gpg
[init]
defaultBranch = main
[merge]
ff = true
[push]
default = current
autoSetupRemote = true
[protocol]
version = 2
[pull]
ff = only
[include]
path = ~/.gitconfig.identity