-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgitconfig
More file actions
24 lines (24 loc) · 1.19 KB
/
gitconfig
File metadata and controls
24 lines (24 loc) · 1.19 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
[alias]
# https://www.mediawiki.org/wiki/Git/aliases
amend = commit --amend -a
br = branch
branch-cleanup = "!f() { git branch --merged ${1-master} | grep -v " ${1-master}$" | xargs -n 1 git branch -d; }; f"
co = checkout
ds = diff --staged
di = diff
fetchall = fetch -v --all
log-fancy = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(cyan)<%an>%Creset' --abbrev-commit --date=relative
# With git >= 1.8.3 you can use %C(auto) for the branch decorator (%d)
log-fancy = log --graph --pretty=format:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(cyan)<%an>%Creset' --abbrev-commit --date=relative
log-me = !UN=$(git config user.name)&& git log --author="\"$UN\"" --pretty=format:'%h %cd %s' --date=short
log-nice = log --graph --decorate --pretty=oneline --abbrev-commit
panic = !DN=$(echo "${PWD##*/}" | tr -s ' ' | tr ' ' '_') && tar cvf ../git_panic.$DN.$(date "+%Y.%m.%d-%H.%M.%S").tar *
st = status
wdiff = diff --word-diff=plain
[color]
ui = auto
[core]
autocrlf = input
[include]
# so, for personal local changes, what i have to is edit local file
path = ~/.gitconfig_local