-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
120 lines (119 loc) · 4.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
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
[alias]
l = log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset' --abbrev-commit --date=local
la = log --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset' --abbrev-commit --date=local
lol = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(bold white) - %an%C(reset)%C(bold yellow)%d%C(reset)' --abbrev-commit --date=relative
lf = log --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(bold yellow)%d%C(reset) %C(white)%s%C(reset) %C(bold white) - %an%C(reset)' --abbrev-commit --date=relative
rprettier = rebase --strategy-option=theirs --exec 'npx prettier --write `git show --name-only --pretty="" HEAD` && git add `git show --name-only --pretty="" HEAD` && git commit --amend --no-edit' main
st = status -sb
stat = status
sh = stash
sha = stash apply
shm = stash push -m
sm = "!_() { git stash || exit 1; rev=$(git rev-parse stash@{0}) && git stash drop stash@{0} || exit 1 ; git stash store -m \"$1\" $rev; }; _"
cp = cherry-pick
cpf = cherry-pick -m 1
co = checkout
cm = "!git co main 2> /dev/null || git co master 2> /dev/null || git co development"
p = pull
f = fetch
rmo = remote -v
br = branch
brr = branch --remote
rsh = reset --hard
rsk = reset --keep
cl = clean -idx -e 'node_modules'
su = submodule update
tf = tfs fetch
tp = tfs pull --rebase
ci = commit
cia = commit --amend
cin = commit --no-verify
lg = log -p
ra = rebase --abort
rc = rebase --continue
ri = rebase -i
standup = log --since 'last monday' --oneline --author '[email protected]'
stand = "!git log --reverse --branches --since=$(if [[ Mon == $(date +%a) ]]; then echo last friday; else echo yesterday; fi) --author=$(git config --get user.email) --format=format:'%C(cyan) %ad %C(yellow)%h %Creset %s %Cgreen%d' --date=local"
alias = config --get-regexp alias
unstage = reset HEAD
mf = merge --no-ff
ma = merge --abort
please = push --force-with-lease --force-if-includes
wip = commit --no-verify -am "WIP"
wipe = !git add -u && git commit --no-verify -qm 'WIPE SAVEPOINT' && git reset HEAD~1 --hard
rem = !git fetch && git rebase origin/main
red = !git fetch && git rebase origin/development
undo = reset HEAD~1 --mixed
be = rev-list --left-right --count origin/main...@
db = "!for branch in `git branch -vv | grep ': gone]' | awk '{print $1}'`; do git branch -D $branch; done"
exec = "!exec "
set-upstream = !git push --set-upstream origin `git symbolic-ref --short HEAD`
pain = !git log --format=format: --name-only | egrep -v '^$' | sort | uniq -c | sort -rg | head -10
cif = !git log -n 50 --pretty=format:'%h %s' --no-merges | fzf | cut -c -7 | xargs -o git commit --fixup
cof = !git branch | fzf | xargs -o git co
cis = !git log -n 50 --pretty=format:'%h %s' --no-merges | fzf | cut -c -7 | xargs -o git commit --squash
reword = !git log -n 50 --pretty=format:'%h %s' --no-merges | fzf | cut -c -7 | xargs -o -I{} git commit --fixup=reword:{}
marker = commit --no-verify --allow-empty -m '=============START OF BRANCH============='
rim = rebase -i 'HEAD^{/=====}^'
rcc = -c core.editor=true rebase --continue
open = "!f() { REPO_URL=$(git config remote.origin.url); start ${REPO_URL%%.git}; }; f"
prdesc = !git log origin/development..HEAD --reverse --format=format:'*%s*%n%b' | sed 's/Related[- ]work[- ]items.*//'
default = !git remote show origin | sed -n '/HEAD branch/s/.*: //p'
migrate = !git rebase --onto development
mw = "!f() { git log --merges --ancestry-path --oneline $1..origin | tail; }; f"
dad = !curl https://icanhazdadjoke.com/ && echo
reso = reset --keep @{u}
abb = !git absorb --base main --force
[color]
branch = auto
diff = auto
interactive = auto
status = auto
[core]
autocrlf = true
excludesfile = ~/.gitignore_global
editor = nvim
pager = "delta --dark"
# editor = code --wait
[delta]
hyperlinks = true
hyperlinks-file-link-format = "vscode://file/{path}:{line}"
[diff]
tool = bc3
guitool = beyondcompare3
[difftool "bc3"]
path = c:/program files/beyond compare 4/bcomp.exe
[push]
default = upstream
autoSetupRemote = true
useForceIfIncludes = true
[merge]
tool = bc3
guitool = bc3
conflictStyle = zdiff3
[mergetool "bc3"]
path = c:/program files (x86)/beyond compare 4/bcomp.exe
cmd = \"\" \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\"
[branch]
autosetuprebase = always
[gc]
autoDetach = false
[pull]
rebase = true
[difftool "bc"]
path = c:/Program Files/Beyond Compare 4/bcomp.exe
[rerere]
enabled = true
[fetch]
prune = true
[rebase]
autoStash = true
autosquash = true
updateRefs = true
abbreviateCommands = true
[commit]
verbose = true
[svn]
rmdir = true
[init]
defaultBranch = main