forked from mathiasbynens/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 2
/
gitconfig.base
55 lines (52 loc) · 1.52 KB
/
gitconfig.base
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
[init]
templatedir = ~/.git_template
[push]
default = current
[color]
ui = auto
[alias]
br = branch
ca = commit --amend
ce = commit --amend --no-edit
ci = commit
cl = clone
co = checkout
cp = cherry-pick
df = diff
ds = diff --staged
# show only 10 logs
l = log --graph --oneline --decorate -10
rb = rebase
rba = rebase --abort
rbc = rebase --continue
rbi = rebase --interactive
rh = reset --hard
s = stash
sp = stash pop
st = status
who = log --pretty=format:'%w(120, 0, 38)%C(yellow)%h%Creset %C(green)%<(15,trunc)%an%Creset %C(cyan)%<(12,trunc)%cr%Creset %C(red)%d%Creset %s' --all
# useful lists - note the plural form
tags = tag -l
branches = branch -a
remotes = remote -v
aliases = config --get-regexp alias
# delete fully merged branches
brd = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
upd = "!git co main && git pull && git co - && git rebase main"
upd-all = "!for branch in $(git for-each-ref --format=\"%(refname:lstrip=2)\" refs/heads/); do git rebase origin/main \"$branch\" || git rebase --abort; done"
[core]
excludesfile = ~/.gitignore
[fetch]
prune = true
[diff]
indentHeuristic = true
compactionHeuristic = true
[diff "bin"]
# Use `hexdump` to diff binary files
textconv = hexdump -v -C
[user]
# force user config on a per repo basis if no global user config
useconfigonly = true
[commit]
template = ~/.gitmessage
# vim: sw=4 ts=4 et filetype=gitconfig: