-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig
138 lines (137 loc) · 4.73 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
[color]
ui = auto
branch = auto
diff = auto
interactive = auto
status = auto
[push]
default = simple
followTags = true
# Because I get sick of telling git to do it manually
# https://git-scm.com/docs/git-config#git-config-pushfollowTags
[core]
editor = emacsclient -nw -c
excludesfile = ~/.gitignore
# git will warn you of trailing whitespace at the end of a line
# as well as blank lines at the end of a file.
whitespace = warn
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[merge]
ff = only
# I pretty much never mean to do a real merge, since I use a rebase workflow.
# Note: this global option applies to all merges, including those done during a git pull
# https://git-scm.com/docs/git-config#git-config-mergeff
conflictstyle = diff3
# Standard diff is two sets of final changes. This introduces the original text before each side's changes.
# https://git-scm.com/docs/git-config#git-config-mergeconflictStyle
[mergetool "sourcetree"]
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[status]
showUntrackedFiles = all
# Sometimes a newly-added folder, since it's only one line in git status, can slip under the radar.
# https://git-scm.com/docs/git-config#git-config-statusshowUntrackedFiles
[user]
email = [email protected]
name = Stephan Schubert
[url "git://github.com/"]
insteadOf = gh:
[alias]
# It happens that you type `git` twice - so please don't balk.
# http://caiustheory.com/git-git-git-git-git/
git = !exec git
fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f"
trash = reset HEAD --hard
unstage = reset HEAD --
last = log -1 HEAD
tree = log --oneline --graph --decorate --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
slap = log --oneline --decorate --graph --all
fix = commit --amend
patch = !git --no-pager diff --no-color
stash-all = stash save --include-untracked
prune = fetch --prune
# https://hackernoon.com/lesser-known-git-commands-151a1918a60
please = push --force-with-lease
commend = commit --amend --no-edit
it = !git init && git commit -m "root" --allow-empty
stsh = stash --keep-index
staash = stash --include-untracked
staaash = stash --all
st = status --short --branch
merc = merge --no-ff
branches = for-each-ref --sort=-committerdate --format=\"%(color:blue)%(authordate:relative)%09%(color:red)%(authorname)%09%(color:white)%(color:bold)%(refname:short)\" refs/remotes
undo = reset --soft HEAD^
[github]
user = jazen
[rerere]
enabled = true
autoupdate = true
[fetch]
prune = true
[pull]
rebase = true
[rebase]
autoStash = true
[core]
pager = delta
[interactive]
diffFilter = delta --color-only --features=interactive
# By default, you have to press enter after making your selection.
# However, it can be configured for single key presses. Add the following
# to your git configuration file to enable single key presses for interactive mode:
singlekey = true
[delta]
features = side-by-side unobstrusive-line-numbers decorations
syntax-theme = Dracula
colorMoved = default
[delta "interactive"]
keep-plus-minus-markers = false
[delta "unobtrusive-line-numbers"]
line-numbers = true
line-numbers-minus-style = "#444444"
line-numbers-zero-style = "#444444"
line-numbers-plus-style = "#444444"
line-numbers-left-format = "{nm:>4}┊"
line-numbers-right-format = "{np:>4}│"
line-numbers-left-style = blue
line-numbers-right-style = blue
[delta "decorations"]
file-style = bold yellow ul
hunk-header-decoration-style = cyan box ul
commit-decoration-style = bold yellow box ul
commit-style = raw
file-decoration-style = none
# file-style = omit
# hunk-header-decoration-style = blue box
hunk-header-file-style = red
hunk-header-line-number-style = "#067a00"
hunk-header-style = file line-number syntax
[delta "line-numbers"]
line-numbers-left-style = "#444444"
line-numbers-right-style = "#444444"
line-numbers-minus-style = red
line-numbers-plus-style = green
[diff]
renames = copies
mnemonicprefix = true
algorithm = patience
[transfer]
fsckobjects = true
# To combat repository corruption!
# Note: this global option applies during receive and transmit
# https://git-scm.com/docs/git-config#git-config-transferfsckObjects
# via https://groups.google.com/forum/#!topic/binary-transparency/f-BI4o8HZW0
[magit]
hideCampaign = true
[magithub]
online = false
[magithub "status"]
includeStatusHeader = false
includePullRequestsSection = false
includeIssuesSection = false
[commit]
cleanup = strip
[magithub "confirm"]
refreshWhenAPIUnresponsive = allow