-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
19 lines (18 loc) · 855 Bytes
/
.gitconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[user]
name = Escher Wenberg
email = [email protected]
[core]
autocrlf = input
excludesfile = /Users/ewenberg/.gitignoreGlobal
editor = vim
[color]
ui = true
[alias]
unstage = reset HEAD --
# git change-commits GIT_AUTHOR_EMAIL "old" "new"
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"
# from https://help.github.com/articles/remove-sensitive-data
remove-file = "!f() { git filter-branch -f --index-filter \"git rm --cached --ignore-unmatch $1\" --prune-empty --tag-name-filter cat -- --all; }; f"
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
[push]
default = current