-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
106 lines (85 loc) · 2.71 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
[user]
name = Brian Ray
email = brian.ray1@gmail.com
[alias]
co = checkout
ci = commit
st = status -u
br = branch
df = diff -C
ds = !git df --staged
a = add -A
sp = stash pop
sl = stash list
sd = stash drop
p = push
pl = pull
l = log --decorate
ls = l --stat
lr = l --reverse
lg = l -p
lgr = lg --reverse
lt = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
lp = log --pretty='%C(yellow)%h %Cblue%>(30)%ad %Cgreen%<(7)%aN%Cred%d %Creset%s'
cp = cherry-pick
branch-name = !git rev-parse --abbrev-ref HEAD
ts = !OVERCOMMIT_DISABLE=1 git ci -m \"`git branch-name` temp ...\"
temp = !git a && git ts
t = temp
rh = reset HEAD^
rt = "!if [[ $(git log --oneline -1 | grep \"temp ...\") ]]; then echo 'Running \"git rh\" on temp commit ...'; git rh; else echo 'No temp commit.'; fi"
#rhard = "!if [ -n \"$1\" ]; then git reset --hard \"$1\"; else git reset --hard HEAD^; fi #"
rhard = reset --hard
rhead = reset --hard HEAD
rprev = reset --hard HEAD^
sort-br = for-each-ref --sort=-committerdate --format='%(committerdate:short) %(refname:short)' refs/heads/
mf = merge --no-ff
ancestor = "!if git merge-base --is-ancestor \"$1\" HEAD; then echo I DO contain commit \"$1\"; else echo I DO NOT contain commit \"$1\"; fi #"
reflogd = reflog --date=format:'%-m/%d %_I:%M:%S %p'
b = !git co $(git br --sort='-authordate' | fzf)
[color]
ui = auto
[gc]
pruneexpire = 30 days
[branch]
# make 'git pull' default to 'git pull --rebase'
autosetuprebase = always
[remote "origin"]
# only push the current branch to its corresponding remote branch
# so we don't accidentally push stable along with master
push = HEAD
[core]
excludesfile = ~/.gitignore
pager = "if [[ \"$RAW\" = \"\" ]]; then delta --line-numbers; else less -Xr; fi"
attributesfile = ~/.gitattributes
[diff]
# Show moved lines in a different color
colorMoved = default
[delta]
syntax-theme = Dracula
# navigate: n/N to jump between commits and hunks
features = decorations navigate
[delta "decorations"]
commit-decoration-style = blue ol bold
file-style = omit
hunk-header-style = file line-number syntax
hunk-header-line-number-style = red bold
# e.g. git add -p
[interactive]
diffFilter = delta --color-only
[merge]
conflictstyle = diff3
[apply]
whitespace = warn
[credential]
helper = osxkeychain
[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
[include]
path = ~/.gitconfig.local
[init]
defaultBranch = main