forked from Nthalk/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitconfig
31 lines (31 loc) · 927 Bytes
/
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
[color]
ui = auto
[rerere]
enabled = 1
autoupdate = 1
[push]
default = simple
[pull]
rebase = true
[core]
editor = vim
ignorecase = false
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[alias]
# workflow
co = checkout
master = "!git checkout master"
branch-name = "!git rev-parse --abbrev-ref HEAD"
publish = "!git push -u origin HEAD"
pull-request = "!git publish && gh pr create $@"
unpublish = "!git push origin :$(git branch-name)"
code-review = difftool origin/master...
rebase-branch = "!git rebase -i `git merge-base master HEAD`"
delete-merged-branches = "!git co master && git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
ours = "!f() { git co --ours $@ && git add $@; }; f"
theirs = "!f() { git co --theirs $@ && git add $@; }; f"
# Helpers and tuners
filelog = log -u
grep = grep -Ii
diff = diff --word-diff