-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
34 lines (34 loc) · 1.08 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
[alias]
detach = "!b=`git rev-parse --abbrev-ref HEAD`; git checkout `git rev-parse HEAD` && git branch -d \"$b\""
fixup = commit --amend --no-edit
hold = branch hold
message = log -1 --format=%B
orphans = "!git tree `git reflog --format=%h`"
tree = log --graph --oneline
treef = log --graph --oneline --name-only
wipfl = "!gd() { git diff --name-only $1; }; gb() { gd; gd --cached; }; gb | sort | tr '\n' ',' | sed 's/,$//'"
wipcm = "!cm=\"wip: $(git wipfl)\"; if test `printf %s \"$cm\" | wc -c` -lt 50; then echo $cm; else echo ${cm:o:47}...; fi"
wip = "!git commit -am \"`git wipcm`\""
[color]
ui = true
[core]
editor = vim
excludesfile = ~/.gitignore-global
# This is a hack to reduce diff tabstop from 8 to 4
pager = less -x1,5
[push]
default = upstream
[include]
# User preferences in a separate file for better modularity
path = .gituser
#[user]
# name = John Doe
# email = [email protected]
[pull]
ff = only
[advice]
detachedHead = false
[merge]
tool = vimdiff
[mergetool]
prompt = false