forked from JakimLi/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig
52 lines (52 loc) · 1.75 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
[init]
templatedir = ~/.git_template
[user]
name = "Xiaofeng Yuan"
email = [email protected]
[push]
default = current
[color]
ui = auto
[alias]
ss = status
aa = !git add . && git status
au = !git add -u && git status
ap = add --patch
br = branch
ba = branch -a
branches = for-each-ref --sort=-committerdate --format=\"%(color:blue)%(authordate:relative)\t%(color:red)%(authorname)\t%(color:white)%(color:bold)%(refname:short)\" refs/remotes
ca = commit --amend -v
ci = commit -v
co = checkout
cb = checkout -b
mg = merge --no-ff
bm = rebase master
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
co-pr = !sh -c 'git fetch origin pull/$1/head:pr/$1 && git checkout pr/$1' -
create-branch = !sh -c 'git push origin HEAD:refs/heads/$1 && git fetch origin && git branch --track $1 origin/$1 && cd . && git checkout $1' -
ctags = "!sh -c '[ -f .git/hooks/ctags ] || git init; .git/hooks/ctags' git-ctags"
current-branch = !sh -c 'git rev-parse --abbrev-ref HEAD' -
delete-branch = !sh -c 'git push origin :refs/heads/$1 && git branch -D $1' -
merge-branch = !git checkout master && git merge @{-1}
pr = !hub pull-request
rename-branch = !sh -c 'old=$(git current-branch) && git branch -m $old $1 && git push origin --set-upstream $1 && git push origin --delete $old' -
up = !git fetch origin && git rebase origin/master
pup = !git fetch origin && git rebase origin/production
[core]
excludesfile = ~/.gitignore
autocrlf = input
[merge]
ff = only
tool = vimdiff
[diff]
tool = vimdiff
[difftool]
prompt = false
[commit]
template = ~/.gitmessage
[fetch]
prune = true
[include]
path = ~/.gitconfig.local
[credential]
helper = osxkeychain