-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
80 lines (70 loc) · 2.7 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
[user]
name =
email =
[core]
editor = vim
preloadindex = true
whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol,
trustctime = false
pager = diff-so-fancy | less --tabs=4 -RFX
# pager = delta
[interactive]
diffFilter = delta --color-only
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
whitespace = red reverse
[color "status"]
added = yellow
changed = green
untracked = cyan
[alias]
st = status
ci = commit
br = branch
co = checkout
df = diff -b
unmerged = branch -a --no-merged
lg = log -50 --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
lgng = log -50 --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
lga = log -50 --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --all
last = log -10 --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
gr = grep -Ii
grc = "!f() { git lg --all --grep=\"$1\"; }; f"
gg = "!f() { A=$(pwd) && TOPLEVEL=$(git rev-parse --show-toplevel) && cd $TOPLEVEL && git grep --full-name -In $1 | xargs -I{} echo $TOPLEVEL/{} && cd $A; }; f"
dry = "!f() { git merge-tree `git merge-base $2 $1` $2 $1; }; f"
jira = "!f() { git lg -10 --grep=ENG $1; }; f"
prb = pull --rebase
cp = cherry-pick
mt = mergetool
brl = !git for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'
merged = !git branch --merged=main | grep -v main | grep -v stable | grep -v production
delmerged = !git branch -d $(git merged)
push-1=!git push origin $(git rev-parse --short HEAD^):$(git name-rev --name-only HEAD)
mergetest = "!f(){ git merge --no-commit --no-ff \"$1\"; git merge --abort; echo \"Merge aborted\"; };f "
[merge]
tool = opendiff
[diff]
tool = opendiff
[difftool]
prompt = false
[difftool "opendiff"]
cmd = /usr/bin/opendiff \"$LOCAL\" \"$REMOTE\" -merge \"$MERGED\"
[mergetool "p4merge"]
cmd = p4merge "$BASE" "$LOCAL" "$REMOTE" "$MERGED"
keepTemporaries = false
trustExitCode = false
keepBackup = false
[apply]
whitespace = nowarn
[push]
default = simple