-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitconfig
132 lines (120 loc) · 3.68 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
[core]
excludesfile = ~/.gitignore-global
[user]
name = Scott Bronson
email = [email protected]
# push should only push current branch, not all branches
[push]
default = current
# git pull should always rebase
[branch]
autosetuprebase = always
[pull]
rebase = true
[help]
autocorrect = 1
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
commit = green bold
meta = green bold
frag = green bold
func = green
plain = yellow
old = red
new = cyan
[color "status"]
added = yellow
changed = green
untracked = cyan
[alias]
; watch = "!watch -n 0.3 'git status --short --branch; echo; git --no-pager diff --shortstat;'"
outgoing = !git fetch && git log FETCH_HEAD..
incoming = !git fetch && git log ..FETCH_HEAD
; a = add
; ae = add --edit
; ai = add --interactive
; ap = add --patch
; au = add --update
b = branch
; ba = branch -a
; bls = branch -v # list branches with last commit in
; brm = branch -d # remove if branch-to-be-removed if fully merged into HEAD
; brmf = branch -D # force removal
; bmv = branch -m
; cg = config --global
; ceg = config --global --edit
; clg = config --global --list
; c = config
; cl = config --list
; ce = config --edit
co = checkout
;cob = checkout -b
;com = "!f() { git fetch; git checkout -b master origin/master; }; f"
;cot = "!f() { git fetch; git checkout -b ${1##*/} $1; }; f "
; coe = "!f() { git symbolic-ref HEAD refs/heads/${1:-empty}; rm .git/index; git clean -fdx; git commit --allow-empty -m 'empty, clean branch'; }; f"
; ca = "!f() { git add $1; git ci -v $1; }; f"
ci = commit -v --untracked-files=no
cia = commit -v -a --untracked-files=no
; ciab = !B=$(git symbolic-ref HEAD 2>/dev/null) && git commit -v -a --edit -m "${B##refs/heads/}:" --untracked-files=no
; cii = commit --interactive
; cim = commit -m
; cip = commit -am '[...in progress...]'
; cir = reset HEAD^
d = diff
dc = diff --cached
dw = diff --word-diff
; do = diff ORIG_HEAD..
; ds = diff --stat=120,130 -M -C
; dy = diff --summary -M -C
; em = "!${EDITOR:-vim} $(git ls-files --modified)"
; eo = "!${EDITOR:-vim} $(git ls-files --other)"
; k = "!gitk &"
l = log
lg = !git ll --graph
lol = log --oneline --abbrev-commit --graph --decorate
lp = log --patch
; lpw = log --patch --word-diff --date=relative
ls = log --stat --graph
; lu = log ORIG_HEAD.. --stat --no-merges --date=relative
; po = push origin HEAD
; poh = push origin HEAD
; pu = pull
; pr = pull --rebase
; up = pull --rebase
; r = rebase
; ra = rebase --abort
; rc = rebase --continue
; ri = rebase --interactive
rm-a = "!git ls-files -z --deleted | xargs -0 git rm"
s = status -sb
; st = status --short --branch --untracked-files=no
; sta = status --short --branch --untracked-files=normal
; sync = !git pull && git push
; ta = tag -a
# http://bit.ly/g9c9Y2 (allows: git clone gh:rails/rails)
[url "http://github.com/"]
insteadOf = "gh:"
[url "[email protected]:"]
pushInsteadOf = "https://github.com/"
pushInsteadOf = "http://github.com/"
pushInsteadOf = "gh:"
[url "[email protected]:bronson/"]
insteadOf = "my:"
; [url "https://gist.github.com/"]
; insteadOf = "gist:"
; [url "[email protected]:"]
; pushInsteadOf = "https://gist.github.com/"
; pushInsteadOf = "http://gist.github.com/"
; pushInsteadOf = "gist:"
[init]
defaultBranch = main
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true