-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig
41 lines (39 loc) · 1.82 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
[alias]
co = checkout
ci = commit
st = status
br = branch
d = diff
dt = difftool
ds = diff --staged
dh = diff HEAD^
fe = fetch
cp = cherry-pick
# From https://stackoverflow.com/questions/1057564/pretty-git-branch-graphs
lg1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
lg = !"git lg1"
# Adapted from https://stackoverflow.com/questions/5188320/how-can-i-get-a-list-of-git-branches-ordered-by-most-recent-commit
recent = "!r() { git branch -r -v --sort=-committerdate --color=always --format='%(refname:short)|%(HEAD)%(color:yellow)%(refname:short)|%(color:bold green)%(committerdate:relative)|%(color:blue)%(subject)|%(color:magenta)%(authorname)%(color:reset)' | while read line; do branch=$(echo \"$line\" | awk 'BEGIN { FS = \"|\" }; { print $1 }' | tr -d '*'); colorline=$(echo \"$line\" | sed 's/^[^|]*|//'); echo \"$colorline\" | awk -F'|' -vOFS='|' '{$3=substr($3,1,70)}1' ; done | ( echo \"branch|committed|message|author\\n\" && cat) | column -ts'|';}; r"
rec = recent
[user]
name = Michael Wolf
email = [email protected]
[diff]
tool = vimdiff
[difftool]
prompt = false
trustExitCode = true
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[init]
defaultBranch = main
[includeIf "gitdir:~/work/"]
path = dotfiles-work/.gitconfig
[advice]
statusHints = false
[pull]
rebase = true