-
Notifications
You must be signed in to change notification settings - Fork 31
/
gitconfig
64 lines (63 loc) · 2.78 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
59
60
61
62
63
64
[user]
name = Jeffery Wilson
email = [email protected]
[core]
autocrlf = input
editor = vim
[alias]
addnw = !sh -c 'git diff -w --no-color "$@" | git apply --cached --ignore-whitespace' -
br = branch
cd = !pushd $(git rev-parse --show-toplevel)
cfb = "!f() { [ \"$2\" ] && BASE=$2 || BASE=main && git checkout --no-track -b $1 origin/$BASE; }; f"
ci = commit -v
cl = clone
co = checkout
cp = cherry-pick
cup = "!f(){ b=$1; git fetch --prune; git checkout "$b"; git rebase origin/"$b"; };f"
dc = diff --cached
diverge = ![ "$2" ] && HEAD=$2 || HEAD=HEAD && git diff $(git merge-base --octopus $1 $HEAD)..$HEAD
last = log -1 --stat
ldiverge = ![ "$2" ] && HEAD=$2 || HEAD=HEAD && git show $(git merge-base --octopus $1 $HEAD)..$HEAD
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %Cblue<%an>%Creset' --abbrev-commit --date=relative
lga = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %Cblue<%an>%Creset' --abbrev-commit --date=relative --all
log-standup = !git log --since yesterday --author $(git config user.email) --pretty=short
praise = blame
pretty-log = log --graph --pretty=format:'%Cred%h%Creset%C(bold yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev=8 --date=relative
sba = "!f() { [ \"$3\" ] && BRANCH=$3 || BRANCH=main && git subtree add --prefix $2 $1 $BRANCH --squash; }; f"
sbu = "!f() { [ \"$3\" ] && BRANCH=$3 || BRANCH=main && git subtree pull --prefix $2 $1 $BRANCH --squash; }; f"
st = status -sb
svn-pretty-log = "! f() { git log -n 1000 --graph --color=always --pretty=format:\"%Cred%h%Creset%C(bold yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset%Cred%b%Creset\" --date=relative \"$@\" | parse-git-svn-pretty-log | less -FRS; }; f"
tarball = ![ "$3" ] && NAME=$3 || NAME=$(basename $(git rev-parse --show-toplevel)) && [ "$2" ] && REF=$2 || REF=HEAD && OUTPUT=$1/$NAME-$(git describe $REF | sed 's,^v,,').tar.gz && git archive --prefix=$NAME/ --output=$OUTPUT $REF^{tree} && readlink -m $OUTPUT && true
unstage = reset HEAD --
up = pull --rebase
[color]
ui = auto
[credential]
helper = cache
[help]
autocorrect = 1
[merge]
tool = vimdiff
guitool = vscode
[mergetool]
guiDefault = true
keepBackup = false
[mergetool "vscode"]
cmd = code --wait $MERGED
[push]
default = simple
autoSetupRemote = true
[remote-hg]
hg-git-compat = true
[rerere]
enabled = 1
[web]
browser = chrome
[includeIf "hasconfig:remote.*.url:[email protected]:blinemedical/**"]
path = .gitconfig-work.inc
[includeIf "hasconfig:remote.*.url:https://github.com/blinemedical/**"]
path = .gitconfig-work.inc
[includeIf "hasconfig:remote.*.url:[email protected]:laerdallabs/**"]
path = .gitconfig-work.inc
[includeIf "hasconfig:remote.*.url:https://github.com/laerdallabs/**"]
path = .gitconfig-work.inc