forked from skwp/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 2
/
gitconfig
99 lines (85 loc) · 2.48 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# set these tokens up in your env, such as ~/.secrets
[color]
ui = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[alias]
d = diff # show unstaged changes
dc = diff --cached # show staged changes
last = diff HEAD^ # show last committed change
unstage = reset HEAD # remove files from index (tracking)
uncommit = reset --soft HEAD^ # go back before last commit, with files in uncommitted state
chunkyadd = add --patch # stage commits chunk by chunk
filelog = log -u # show changes to a file
amend = commit --amend
ammend = commit --amend
mt = mergetool #fire up the merge tool
addall = !sh -c 'git add . && git add -u'
# rebasing
rc = rebase --continue
rs = rebase --skip
# save some typing for common commands
ci = commit
co = checkout
b = branch -v
r = remote -v
t = tag -n
# create and switch to a new branch (mnemonic: "git new branch branchname...")
nb = checkout -b
stat = status
s = status
# stashing
ss = stash
sl = stash list
sa = stash apply
sd = stash drop
# grab a change from a branch
cp = cherry-pick -x
# move patch
# default logging
l = log --decorate --graph --date=short --pretty=\"format:%C(blue)%ad%Creset %C(yellow)%h%C(green)%d%Creset %C(blue)%s %C(black) [%an]%Creset\"
# nice logs
changes = log --pretty=format:\"%h %cr %cn %Cgreen%s%Creset\" --name-status
short = log --pretty=format:\"%h %cr %cn %Cgreen%s%Creset\"
changelog = log --pretty=format:\" * %s\"
shortnocolor = log --pretty=format:\"%h %cr %cn %s\"
# svn helpers
svnr = svn rebase
svnd = svn dcommit
svnl = svn log --oneline --show-commit
drop = !sh -c 'git add . && git stash && git stash drop'
grab = !sh -c 'git-grab.sh'
[gc]
# auto = 1
[merge]
summary = true
verbosity = 1
[apply]
whitespace = nowarn
[branch]
autosetupmerge = true
[push]
# 'git push' will push the current branch to its tracking branch
# the usual default is to push all branches
default = tracking
[core]
autocrlf = false
editor = /usr/bin/vim
excludesfile = ~/.dotfiles/gitignore_global
[advice]
statusHints = false
[diff]
# Git diff will use (i)ndex, (w)ork tree, (c)ommit and (o)bject
# instead of a/b/c/d as prefixes for patches
mnemonicprefix = true
[rerere]
# Remember my merges
# http://gitfu.wordpress.com/2008/04/20/git-rerere-rereremember-what-you-did-last-time/
enabled = true