-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig
69 lines (69 loc) · 2.94 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
[include]
path = dotfiles/gitidentity
[core]
autocrlf = false
[color "status"]
added = cyan
changed = yellow
untracked = magenta
[alias]
ci = commit
co = checkout
cob = checkout -b
cm = commit -m
save = !git add -A && git commit -m 'SAVEPOINT'
undo = reset HEAD~1 --mixed
wip = !git add -u && git commit -m "WIP"
# wip = "git add -A; git ls-files --deleted -z | xargs -0 git rm; git commit -m \"wip\""
unwip = "git log -n 1 | grep -q -c wip && git reset HEAD~1"
amend = commit -a --amend
stat = status
st = "status -s"
stsh = stash
rst = reset
br = branch
rb = rebase
llog = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"
lloga = "log --all --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"
llogs = "log --all -n10 --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"
keep = "ls-files --others --directory --exclude-standard | xargs -L 1 -I file touch file/'.gitkeep';"
det = log
ll = "log --oneline"
unstage = reset HEAD --
last = log -1 HEAD
ploop = rebase --onto
no-track = "update-index --assume-unchanged"
track = "update-index --no-assume-unchanged"
bclean = "!f() { git branch --merged ${1-master} | grep -v " ${1-master}$" | xargs git branch -d; }; f"
bdone = "!f() { git checkout ${1-master} && git up && git bclean ${1-master}; }; f"
ignored = !git ls-files -v | grep ^[[:lower:]]""
brhist = 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))'
remotebrhist = for-each-ref --sort=committerdate refs/remotes/ --no-merged master --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'
hide = update-index --assume-unchanged
unhide = update-index --no-assume-unchanged
hidden = ! git ls-files -v | grep '^[a-z]' | cut -c3-
[merge]
# tool = extMerge.sh
tool = vimdiff
trustExitCode = true
keepBackup = false
keepTemporaries = false
# [diff]\
# guitool = extDiff.sh
[mergetool "extMerge.sh"]
cmd = extMerge.sh "$BASE" "$REMOTE" "$LOCAL" "$MERGED"
trustExitCode = false
[color]
status = true
interactive = true
diff = true
[diff]
tool = vimdiff
[difftool]
prompt = false
[init]
defaultBranch = main
[mergetool]
conflictstyle = diff3
[mergetool "vimdiff"]
cmd = vim +\"set number\" +\"setlocal statusline=LOCAL\" +\"vs $BASE\" +\"setlocal statusline=BASE\" +\"vs $REMOTE\" +\"setlocal statusline=REMOTE\" +\"vs $MERGED\" +\"wincmd J\" +\"windo diffthis\" $LOCAL