-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.gitconfig
96 lines (86 loc) · 2.3 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
[alias]
a = add
aa = add --all
co = checkout
# checkout usual branches
master = checkout master
main = checkout main
staging = checkout staging
production = checkout production
# checkout branch, creating it if necessary
go = checkout -B
c = commit
# commit all changes
ca = !git add -A && git commit -av
# credit an author on the latest commit
credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f"
d = diff
# diff: `git di $number` shows the diff between the state `$number` revisions ago and the current state
di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d"
l = log
pl = pull
# pull including all submodules
ppl = !"git pull; git submodule foreach git pull origin master"
ps = push
qs = quick-stats
# undo push
undopush = push -f origin HEAD^:master
s = status
# show verbose output about tags, branches or remotes
tags = tag -l
branches = branch -a
remotes = remote -v
# Interactive rebase with the given number of latest commits
reb = "!r() { git rebase -i HEAD~$1; }; r"
[apply]
# detect whitespace errors when applying a patch
whitespace = fix
[core]
excludesfile = ~/.gitignore
# treat spaces before tabs, lines that are indented with 8 or more spaces, and all kinds of trailing whitespace as an error
whitespace = space-before-tab,indent-with-non-tab,trailing-space
editor = code --wait
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow
frag = white
old = red
new = green
plain = white dim
[color "status"]
added = green
changed = blue
untracked = red
[merge]
# include summaries of merged commits in newly created merge commit messages
log = true
# always use `origin` as the default remote on the `master` branch
[branch "master"]
remote = origin
merge = refs/heads/master
[remote "origin"]
push = HEAD
[push]
default = simple
# URL shorthands
[url "[email protected]:"]
insteadOf = "gh:"
pushInsteadOf = "github:"
pushInsteadOf = "git://github.com/"
[url "git://github.com/"]
insteadOf = "github:"
[url "[email protected]:"]
insteadOf = "gst:"
pushInsteadOf = "gist:"
pushInsteadOf = "git://gist.github.com/"
[url "git://gist.github.com/"]
insteadOf = "gist:"
# personal details
[user]
email = [email protected]
name = Simon Goumaz