forked from justone/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
59 lines (51 loc) · 2.07 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
[alias]
#deploy = "!sh -c 'echo \"# $(basename "$PWD") (BRANCH: $(br=`git symbolic-ref HEAD`; echo ${br#refs/heads/}))\ncd '$(pwd)' \ngitswitch '$(git rev-parse HEAD)';\"' | pbcopy; echo Deploy instructions copied."
deploy = "!sh -c 'if [ $(git rev-parse --show-cdup | xxd -ps) != '0a' ]; then cd $(git rev-parse --show-cdup); fi; echo \"# $(basename "$PWD") (BRANCH: $(br=`git symbolic-ref HEAD`; echo ${br#refs/heads/}))\ncd '$(pwd)'; \nsudo gitswitch '$(git rev-parse HEAD)';\"' | pbcopy; echo Deploy instructions copied."
deploys = "!sh -c 'echo \"# $(basename "$PWD") (BRANCH: $(br=`git symbolic-ref HEAD`; echo ${br#refs/heads/}))\nsudo gitsqldeploy '$(git rev-parse HEAD)';\"' | pbcopy; echo SQL deploy instructions copied."
branchdate = "for k in `git branch | perl -pe s/^..//`; do echo -e `git show --pretty=format:\"%Cgreen%ci %Cblue%cr%Creset\" $k -- | head -n 1`\\t$k; done | sort -r"
[alias]
branchdate = "!git for-each-ref --sort='-authordate' --format='%(authordate)%09%(objectname:short)%09%(refname)' refs/heads | sed -e 's-refs/heads/--'"
# one-line log
l = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short
a = add
cm = commit -m
s = status -s
co = checkout
cob = checkout -b
# list branches sorted by last modified
b = "!git for-each-ref --sort='-authordate' --format='%(authordate)%09%(objectname:short)%09%(refname)' refs/heads | sed -e 's-refs/heads/--'"
d = diff
# list aliases
la = "!git config -l | grep alias | cut -c 7-"
up = pull --rebase --autostash
[color]
branch = auto
diff = auto
status = auto
interactive = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan
[merge]
tool = fugitive
[diff]
tool = opendiff
[core]
editor = vim
[user]
name = patrick.mcnally
email = [email protected]
[push]
default = simple
[mergetool "fugitive"]
cmd = mvim -f -c \"Gdiff\" \"$MERGED\"