/
.gitconfig
executable file
·87 lines (66 loc) · 2.02 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
[apply]
whitespace = fix
[merge]
#ff = only
tool = vimdiff
autoStash = true
[rebase]
autoStash = true
[pull]
rebase = true
[diff]
tool = icdiff
[difftool]
prompt = false
[difftool "icdiff"]
cmd = /usr/local/bin/icdiff --line-numbers $LOCAL $REMOTE
[transfer]
fsckobjects = true
[color]
ui = auto
status = auto
branch = auto
diff = auto
[alias]
stage = add
unstage = reset HEAD
ci = commit
cia = commit --amend
co = checkout
br = branch
st = status
dc = diff --cached
dw = diff --word-diff
dt = difftool
aa = add -A :/
prb = pull --rebase
rbc = rebase --continue
# rbi - rebase interactive on our unpushed commits.
rbi = !"git rebase -i @{u} --autosquash"
rbn = !"git rebase -i HEAD~$1 --autosquash"
rmall = !git ls-files --deleted | xargs git rm
branch-name = !"git rev-parse --abbrev-ref HEAD"
diff-to-base = "!f() { git diff $(git merge-base --fork-point master $1)..$1; }"
# Publish the current branch by pushing it to the remote "origin",
# and setting the current branch to track the upstream branch.
publish = !"git push -u origin $(git branch-name)"
# Unpublish the current branch by deleting the
# remote version of the current branch.
unpublish = !"git push origin :$(git branch-name)"
pullall = "!f() { git pull $@ && git submodule update --init --recursive; }; f"
addregex = !"$MY_SCRIPTS"/git/git_add_regex.sh
out = !"git lk origin/$(git branch-name)..HEAD"
in = !"git fetch || git lk ..origin/$(git branch-name)"
pushto = "!f() { git push origin $(git branch-name):$1; }; f"
# From six-arm config
lk = log --graph --topo-order --abbrev-commit --date=short --decorate --all --boundary --pretty=format:'%Cgreen%ad %Cred%h%Creset -%C(yellow)%d%Creset %s %Cblue[%cn]%Creset'
lkl = !git lk --numstat
[core]
editor = nvim
[user]
name = Vadim Platonov
email = platonovadim@gmail.com
[push]
default = upstream
[init]
defaultBranch = main