-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitconfig
More file actions
43 lines (43 loc) · 1.6 KB
/
.gitconfig
File metadata and controls
43 lines (43 loc) · 1.6 KB
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
[user]
name = Cameron Blocker
email = cameronjblocker@gmail.com
[push]
default = simple
[core]
editor = subl -n -w
[github]
user = cjblocker
[ghi]
token = !security find-internet-password -a cjblocker -s github.com -l 'ghi token' -w
[diff "jupyternotebook"]
command = git-nbdiffdriver diff
[merge "jupyternotebook"]
driver = git-nbmergedriver merge %O %A %B %L %P
name = jupyter notebook merge driver
[difftool "nbdime"]
cmd = git-nbdifftool diff \"$LOCAL\" \"$REMOTE\"
[difftool]
prompt = false
[mergetool "nbdime"]
cmd = git-nbmergetool merge \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"
[mergetool]
prompt = false
[alias]
co = checkout
cob = checkout -b
up = !git pull --rebase --prune $@ && git submodule update --init --recursive
bclean = "!f() { git branch --merged ${1-master} | grep -v " ${1-master}$" | xargs -r git branch -d; }; f"
ls = status -s
stat = status
st = status
unstage = reset HEAD --
last = log -1 HEAD
wdiff = diff --color-words
root = rev-parse --show-toplevel
exec = "!exec "
# https://stackoverflow.com/questions/38057261/git-config-alias-escaping
quote-string = "!read -r l; printf \\\"!; printf %s \"$l\" | sed 's/\\([\\\"]\\)/\\\\\\1/g'; printf \" #\\\"\\n\" #"
quote-string-undo = "!read -r l; printf %s \"$l\" | sed 's/\\\\\\([\\\"]\\)/\\1/g'; printf \"\\n\" #"
open = "!f() { open $(git config remote.$(git remote | head -n1).url| sed \"s#git@\\(.*\\):\\(.*\\).git#https://\\1/\\2#\"| sed \"s#\\(hg::\\)*\\(.*\\)\\(.git\\)*#\\2#\"); }; f #"
# https://stackoverflow.com/a/56510040/5026175
sh = "!perl -nE 'BEGIN {print \"git > \"} system \"git $_\"; print \"git > \"' #"