-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
48 lines (48 loc) · 1.9 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
[user]
name = Niels Doucet
[merge]
renamelimit = 5000
[branch]
autosetuprebase = always
[alias]
alias-list = config --get-regexp alias
alias-remove = config --global --unset
branch-del = branch -d
branch-rel = log --graph --simplify-by-decoration --pretty=format:\"%d\" --all
clean-all = !git clean -f -d && git tag-prune
cleanup = fetch -p
co = checkout
commit-all = commit -a -m
diff-list = diff --name-status
diff-pretty = diff --stat
# Remove branches that have already been merged
dm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
dv = diffview
# Find branches containing commit
fb = "!f() { git branch -a --contains $1; }; f"
# Find commits by commit message
fm = "!f() { git log --pretty=format:'%C(yellow)$h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f"
go = checkout -b
latest = log --format=\"%Cred%h %Creset%cr %Cgreen%gs %an %Creset%f\"
lg = log --color --graph --pretty=format:'%Cred%h%Creset - %C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
logf = log --follow
pull-all-submodules = submodule update --remote --recursive
push-head = push origin HEAD
recent = "!r() { cur=$(git rev-parse --abbrev-ref HEAD); git for-each-ref --sort=committerdate $1 --format='%(color:yellow)%(refname:short)|%(color:bold green)%(committerdate:relative)|%(color:blue)%(subject)|%(color:magenta)%(authorname)%(color:reset)' | sed \"s/m${cur}|/m* ${cur}|/\" | column -ts'|'; }; r ${1:-refs/heads/}"
resolve-ours = !sh -c 'git co --ours $0 && git add $0'
resolve-theirs = !sh -c 'git co --theirs $0 && git add $0'
s = status -s
st = status
tag-prune = !git tag -l | xargs git tag -d && git cleanup
[core]
ignorecase = false
autocrlf = input
trustctime = false
whitespace = space-before-tab,trailing-space
[apply]
# Detect whitespace errors when applying a patch
whitespace = fix
[color]
ui = auto
[push]
gpgSign = if-asked