-
Notifications
You must be signed in to change notification settings - Fork 7
/
gitconfig
executable file
·77 lines (63 loc) · 2 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
[user]
name = Juan Ignacio Márquez
email = [email protected]
[credential]
helper = osxkeychain
[alias]
aa = add --all
ap = add --patch
ca = commit --amend
cm = commit
cmm = commit -m
ci = commit -a
co = checkout
cp = checkout --patch
cb = checkout -b
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"
delete-branch = !sh -c 'git push origin :refs/heads/$1 && git branch -D $1' -
merged-branches = branch --merged master --format "%(refname:short)"
prune-branches = !sh -c 'git merged-branches | grep -v master | xargs -n 1 git branch -d'
fixup = !sh -c 'REV=$(git rev-parse $1) && git commit --fixup $@ && git rebase -i --autosquash $REV^' -
merge-branch = !git checkout master && git merge @{-1}
pr = !gh pull-request
st = status
rb = rebase
up = !git fetch origin && git rebase origin/master
wip = commit -a -m "wip"
dewip = reset HEAD~1
squash = !sh -c 'REV=$(git rev-parse $1) && git commit --squash $@ && git rebase -i --autosquash $REV^' -
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset %an' --abbrev-commit --date=relative
lo = log --oneline
[core]
excludesfile = ~/.gitignore
autocrlf = input
[push]
default = upstream
[color]
ui = auto
[fetch]
prune = true
[merge]
ff = only
[checkout]
defaultRemote = origin
[commit]
template = ~/.gitmessage
[gitsh]
noGreeting = true
defaultCommand = status --short --branch && :echo
[gitsh "color"]
default = cyan
untracked = yellow
modified = red
[hub]
protocol = https
[github]
user = imarquezc
[pager]
diff = diff-so-fancy | less --tabs=1,5 -RFX
show = diff-so-fancy | less --tabs=1,5 -RFX
log = diff-so-fancy | less --tabs=1,5 -RFX
branch = diff-so-fancy | less --tabs=1,5 -RFX