-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitconfig
58 lines (53 loc) · 1.39 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
[user]
name = Sean Niu
email = [email protected]
[core]
excludesfile = ~/.gitignore_global
editor = vim
[alias]
# Shorter common commands
st = status
ci = commit
civ = commit --verbose
co = checkout
# More readable git aliases
# Credit: http://gggritso.com/human-git-aliases
# Consistent listing
branches = branch -a
tags = tag
stashes = stash list
remotes = remote -v
aliases = config --get-regexp ^alias\\.
# Staging
unstage = reset -q HEAD --
discard = checkout --
uncommit = reset --mixed HEAD~
amend = commit --amend
nevermind = !git reset --hard HEAD && git clean -d -f
precommit = diff --cached --diff-algorithm=minimal -w
unmerged = diff --name-only --diff-filter=U
untrack = rm --cached
# Finding
whenadded = log --diff-filter=A
# Log formats
fancy = log --graph \
--pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' \
--abbrev-commit --date=relative
graph = log --graph -10 --branches --remotes --tags \
--format=format:'%Cgreen%h %Creset• %<(75,trunc)%s (%cN, %cr) %Cred%d' \
--date-order
graphall = log --graph --branches --remotes --tags \
--format=format:'%Cgreen%h %Creset• %<(75,trunc)%s (%cN, %cr) %Cred%d' \
--date-order
[push]
default = simple
[color]
ui = auto
[diff]
tool = kdiff3
[merge]
tool = kdiff3
[filter "lfs"]
smudge = git-lfs smudge -- %f
required = true
clean = git-lfs clean -- %f