forked from mathiasbynens/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitconfig
More file actions
135 lines (115 loc) · 3.72 KB
/
.gitconfig
File metadata and controls
135 lines (115 loc) · 3.72 KB
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
133
134
135
[include]
path = ~/.gitconfig_aliases
[apply]
whitespace = nowarn
[core]
excludesfile = ~/.gitignore
attributesfile = ~/.gitattributes
editor = code --wait
pager = most
whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol
autocrlf = input
[alias]
# One-letter aliases
a = add --all
b = branch
d = diff
e = !git diff | $EDITOR
l = log --pretty=oneline -n 20 --graph
m = merge --no-ff
p = pull
u = reset HEAD --
# Simple fairly-frequent aliases.
au = add --update .
ac = !git add -p; git commit
co = checkout
ci = commit
cl = clone
ca = commit --amend
cp = cherry-pick # cherry-pick - apply the changes introduced by some existing commits; useful for moving small chunks of code between branches.
cp-nx = cherry-pick --no-commit -x # cherry-pick without making a commit, and when when recording the commit, append a line that says "(cherry picked from commit ...)"
st = status -sb
br = branch
brm = branch --merged
brnm = branch --no-merged
so = show --pretty=format: --name-only
sp = stash pop
spf = !git stash show -p $1 | git apply && git stash drop
type = cat-file -t
dump = cat-file -p
amend = commit --amend --no-edit
w = whatchanged
r = reset
r1 = reset HEAD^
r2 = reset HEAD^^
rh = reset --hard
rh1 = reset HEAD^ --hard
rh2 = reset HEAD^^ --hard
hist = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
lds = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative
me = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --author=plbabin --date=relative
paul = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --author=paul.smith.iv@ninthavenuemedia.com --date=relative
count = shortlog -sn
credit = commit --amend --author "$1 <$2>" -C HEAD
stash-all = stash save --include-untracked
unstage = reset HEAD --
undo = reset --soft HEAD^
pso = push origin
plo = pull origin
f = "!git ls-files | grep -i"
la = "!git config -l | grep alias | cut -c 7-"
lt = describe --tags --abbrev=0
recap = log --since=\"24 hours ago\" --no-merges --oneline --author=plbabin@gmail.com
local-branches = !git branch -vv | cut -c 3- | awk '$3 !~/\\[/ { print $1 }'
[mergetool]
keepBackup = false
# [merge]
# conflictstyle = diff3
# tool = diffmerge
# [mergetool "diffmerge"]
# cmd = diffmerge --merge --result=$MERGED $LOCAL $BASE $REMOTE
# trustExitCode = true
[merge]
conflictstyle = diff3
tool = vscode
[mergetool "vscode"]
cmd = code --wait $MERGED
[pull]
rebase = true
[push]
default = matching
[help]
autocorrect = 1
# Use `origin` as the default remote on the `master` branch in all cases
[branch "master"]
remote = origin
merge = refs/heads/master
[branch]
autosetupmerge = true
[color]
branch = auto
diff = auto
interactive = auto
pager = true
status = auto
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
whitespace = red reverse
[color "status"]
added = yellow
changed = green
untracked = cyan
[status]
showUntrackedFiles = all
# Sometimes a newly-added folder, since it's only one line in git status, can slip under the radar.
# https://git-scm.com/docs/git-config#git-config-statusshowUntrackedFiles