-
Notifications
You must be signed in to change notification settings - Fork 6
/
_gitconfig
65 lines (53 loc) · 1.57 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
65
; vim: ft=gitconfig
[user]
name = Matt Smith
email = [email protected]
signingkey = Matt Smith (Git Signing) <[email protected]>
[github]
user = mtscout6
[core]
editor = vim
excludesfile = ~/.gitignore_global
autocrlf = input
[help]
autocorrect=-1
[push]
default = tracking
[log]
date = local
[alias]
# Log aliases
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(cyan)- %an%Creset' --abbrev-commit --date=relative
lstat = log --stat --relative --abbrev-commit --date=local --pretty=format:'%C(white)%h %C(cyan)%cr %C(green)by %cn %Creset%C(yellow)%n%s%Creset'
peeps = !git log --pretty=format:%aN | sort | uniq -c | sort -rn
lf = "!f() { git log --follow $1; }; f" # Shows the log for a file and it follows the revisions of the file when renamed
di = diff --staged
# Branch / Remote management
fmerge = merge --ff-only
req = "!f() { git fetch origin refs/pull/$1/head:pr/$1 -f; } ; f"
wt = worktree
wtl = worktree list
wta = worktree add
# TODO figure out a chdir solution
wtp = "!f() { \
wtpath=$(git worktree list | grep "\\\\[$1]" | sed 's/ .*//g'); \
echo $wtpath; \
}; f"
# Basic Commands
co = checkout
cop = "!f() { git checkout pr/$1; }; f"
ci = commit -S
st = status -sb
mt = mergeTool
ba = branch
baa = branch -a
pr = !git fa && git pull --rebase
cp = cherry-pick
aa = add -A .
fa = fetch -p --all
rc = rebase --continue
clonew = "!f() { ~/.bin/git-work-clone.sh $@; } ; f"
[filter "lfs"]
clean = git-lfs clean %f
smudge = git-lfs smudge %f
required = true