-
Notifications
You must be signed in to change notification settings - Fork 2
/
gitconfig
44 lines (36 loc) · 1.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
[user]
name = Matt Perpick
email = [email protected]
[alias]
# shorthands
st = status -s
sti = status -s --ignored
ci = commit
br = branch
bra = branch -a
co = checkout
df = diff
lg = log -p
stashes = stash list
unstage = reset HEAD
dl = "!dl() { git fetch -pq && git pull;}; dl"
# pretty print history
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
tree = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%C(bold blue)<%an>%Creset' --abbrev-commit
f = "!git ls-files | grep -i"
# destroy a branch locally and remote
destroy = "!gd() { git branch -D $1 && git push origin :$1; }; gd"
close = "!gd() { git branch -d $1 && git push origin :$1; }; gd"
# print paths of conflicting files
conflicts = diff --name-only --diff-filter=U
# hard reset to origin's current branch state
hro = "!githro() { git reset --hard origin/$(git rev-parse --abbrev-ref HEAD); }; githro"
[core]
whitespace = trailing-space,space-before-tab,cr-at-eol
excludesfile = /home/vagrant/.gitignore
[color]
ui = true
diff = true
[push]
default = upstream