-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitconfig
29 lines (28 loc) · 1.25 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
[include]
path = ~/.gitconfig-ndparker
[include]
path = ~/.gitconfig-work
[push]
default = simple
[init]
defaultBranch = master
[core]
fsyncMethod = writeout-only
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[alias]
co = checkout
pick = cherry-pick
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen%cr%Creset %Cblue[%ar]%Creset %C(bold blue)<%an>%Creset' --color --abbrev-commit
ln = log --graph --pretty=format:'%h -%d% %s [%ar] <%an>' --no-color --abbrev-commit
diff = diff --minimal
diffo = !git diff "origin/$(git branch --show-current)"
please = push --force-with-lease
it = !git init && git commit -m “root” --allow-empty
uncommit = reset HEAD~
empty = commit --allow-empty
pr = !"_foo() { git fetch origin pull/\"${1}\"/head:\"${2:-pr${1}}\" && git checkout \"${2:-pr${1}}\"; }; _foo"
hub = !"_foo() { local x=\"$(git remote get-url origin)\"; echo \"${x}\" | grep -qF 'github.com' || return 0; x=\"${x%.git}\"; x=\"$( echo \"${x}\" | sed -e 's,git@github\\.com:,https://github.com/,' )\"; echo \"${x}\"; [ \"${x#https://}\" != \"${x}\" ] || return 0; xdg-open \"${x}\" >/dev/null; }; _foo"