-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig
47 lines (40 loc) · 1.28 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
[core]
editor = vim
excludesfile = ~/.gitignore.global
pager = less -+S
[color]
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
[alias]
st = status
# commit
ci = commit
# branch
br = branch -v
# checkout
co = checkout
# diff
df = diff --word-diff
dc = diff --cached
dl = diff HEAD^
# log
lg = log -p
log = log --decorate --graph --date=short
changes = log --pretty=format:\"%h %cr %cn %Cgreen%s%Creset\" --name-status
short = log --pretty=format:\"%h %cr %cn %Cgreen%s%Creset\"
changelog = log --pretty=format:\" * %s\"
lsd = log --graph --decorate --pretty=oneline --abbrev-commit --all
lsd2 = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
h = !git --no-pager log origin/master..HEAD --abbrev-commit --pretty=oneline
# reset
unstage = reset HEAD # remove files from index (tracking)
uncommit = reset --soft HEAD^ # go back before last commit, with files in uncommitted state
filelog = log -u # show changes to a file