-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitconfig
31 lines (31 loc) · 1.05 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
[user]
email = [email protected]
name = xxxx
[color]
ui = auto
[diff]
tool = vimdiff
[difftool]
prompt = false
[push]
default = current
[pull]
default = current
[grep]
linenumber = true
[merge]
tool = vimdiff
conflictstyle = diff3
[pager]
branch = false
[alias]
clear = remote prune origin
last = log -1 HEAD
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
remove-prefix = "!f() { git branch | grep ${1} | xargs git branch -d; }; f"
force-remove-prefix = "!f() { git branch | grep ${1} | xargs git branch -D; }; f"
remove-remote-branch = push origin --delete
replace-text = "!f() { git grep -l ${1} | xargs sed -i '' -e 's/'${1}'/'${2}'/g'; }; f"
tree = log --pretty=oneline --abbrev-commit --graph
change-commits = "!f() { VAR=$1; OLD=$2; NEW=$3; shift 3; git filter-branch --env-filter \"if [[ \\\"$`echo $VAR`\\\" = '$OLD' ]]; then export $VAR='$NEW'; fi\" $@; }; f "