-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig
49 lines (42 loc) · 1.41 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
[include]
path = ~/.gitconfig.local
[push]
default = simple
[core]
excludesfile = ~/.gitignore
pager = less -x2
editor = vim -c startinsert
[diff]
algorithm = minimal
[alias]
aa = add --all
alias = config --get-regexp alias
br = branch
branch-name = rev-parse --abbrev-ref HEAD
brr = branch --remotes
checkout-head-branch = ! git checkout "$(git head-branch)"
ci = commit
cia = commit --all
co = checkout
co-hb = ! git checkout "$(git head-branch)"
co-prev = checkout @{-1}
fix-and-rebase = "! sh -c \"git commit --fixup $1 && git rebase --interactive --autosquash $1~\""
head-branch = ! git remote show origin | grep 'HEAD branch: ' | awk '{print $3}'
hist = ! git history --max-count 25 && echo ...
history = log --pretty=format:'%Cred%<(8)%h%Creset %<(64,trunc)%s %Cgreen%<(14,trunc)%an%Creset %Cblue%<(10,trunc)%ad%Creset'
last-commit-hash = rev-parse --short HEAD
new = checkout -b
pl = ! git branch --verbose | grep --fixed-strings '[gone]' | awk '{print $1}' | xargs --no-run-if-empty git branch --delete
pr = remote prune origin
publish = ! git push --set-upstream origin "$(git branch-name)"
push-force-gently = push --force-with-lease
rebase-origin-head-branch = ! git fetch && git rebase "origin/$(git head-branch)"
reset-origin-hard = ! git fetch && git reset --hard "origin/$(git branch-name)"
st = status
[log]
date = relative
[rerere]
enabled = true
autoupdate = true
[fetch]
prune = true