-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.gitbase
More file actions
81 lines (67 loc) · 2.78 KB
/
.gitbase
File metadata and controls
81 lines (67 loc) · 2.78 KB
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
[diff]
tool = vimdiff
algorithm = patience
[pager]
diff =
status =
branch =
[color]
ui = auto
[core]
excludesfile = ~/.gitignore_global
[alias]
st = status
co = checkout
rha = reset --hard
spop = stash pop
soup = submodule update
soupir = submodule update --init --recursive
puree = pull --rebase
puf = push --force
# Stash only unstaged files
ski = "!git commit -mprestash; git stash \"$@\"; git reset --soft HEAD@{1}"
# Recursively clean a repository
nuke = "!git clean -fdx; git submodule foreach --recursive git clean -fdx"
# Push and track a new branch on a remote (origin by default)
pu = "!f() { git push -u ${1:-origin} `git symbolic-ref --short HEAD`; }; f"
# Add new files, but ignore whitespace changes
addnw = !sh -c 'git diff -U0 -w --no-color "$@" | git apply --cached --ignore-whitespace --unidiff-zero -'
b = branch -v
br = branch -rv
bd = branch -d
bdd = branch -D
ci = commit
cia = commit --amend
rb = rebase
rbw = rebase -Xignore-space-change -Xignore-space-at-eol -Xignore-cr-at-eol
cp = cherry-pick
cpw = cherry-pick -Xignore-space-change -Xignore-space-at-eol -Xignore-cr-at-eol
s = show
sw = show --ignore-space-change --ignore-space-at-eol --ignore-cr-at-eol
sfull = show --word-diff-regex=.
m = merge
mw = merge -s recursive -Xignore-space-change -Xignore-space-at-eol -Xignore-cr-at-eol
mlog = log --oneline --left-right HEAD...MERGE_HEAD
d = diff
dw = diff --ignore-space-change --ignore-space-at-eol --ignore-cr-at-eol
ds = diff --staged
dsw = diff --staged --ignore-space-change --ignore-space-at-eol --ignore-cr-at-eol
dmin = diff --diff-algorithm=minimal --ignore-space-change --ignore-space-at-eol --ignore-cr-at-eol
dsmin = diff --staged --diff-algorithm=minimal --ignore-space-change --ignore-space-at-eol --ignore-cr-at-eol
dfull = diff --word-diff-regex=.
dsfull = diff --staged --word-diff-regex=.
assume = update-index --assume-unchanged
unassume = update-index --no-assume-unchanged
assumed = "!git ls-files -v | grep ^h | cut -c 3-"
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
slg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --stat
l = log --pretty=oneline --abbrev-commit
up = !sh -c 'git pull --rebase --prune && git log --pretty=format:\"%Cred%ae %Creset- %C(yellow)%s %Creset(%ar)\" HEAD@{1}..'
[push]
default = simple
[merge]
tool = vimdiffex
[mergetool.vimdiffex]
cmd = vimdiff -f -d -c \"wincmd J\" -c 'call map(filter(range(1, bufnr(\"$\")), \"bufexists(v:val)\"), \"setbufvar(v:val, \\\"&modifiable\\\", v:val == 1)\")' \"$MERGED\" \"$LOCAL\" \"$BASE\" \"$REMOTE\"
[rerere]
enabled = true