forked from rosenstrauch/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitconfig
85 lines (64 loc) · 2.35 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Set your name and email with the following:
# git config -f ~/.gitconfig.local user.name John Appleseed
# git config -f ~/.gitconfig.local user.email [email protected]
[user]
[include]
path = .gitconfig.local
[color]
ui = auto
[color "diff"]
commit = yellow reverse
[core]
excludesfile = ~/.gitignore
[push]
default = matching
[merge]
log = true
conflictstyle = diff3
tool = meld
[mergetool]
prompt = false
[rebase]
autosquash = true
[url "[email protected]:"]
insteadOf = "gh:"
pushInsteadOf = "github:"
pushInsteadOf = "git://github.com/"
[url "git://github.com/"]
insteadOf = "github:"
[url "[email protected]:"]
insteadOf = "gst:"
pushInsteadOf = "gist:"
pushInsteadOf = "git://gist.github.com/"
[url "git://gist.github.com/"]
insteadOf = "gist:"
[url "[email protected]:"]
insteadOf = "heroku:"
[git-up "bundler"]
check = true
[rerere]
enabled = 1
[gitflow "branch"]
master = master
develop = develop
[gitflow "prefix"]
feature = feature/
release = release/
hotfix = hotfix/
support = support/
versiontag =
[git-up "rebase"]
arguments = --preserve-merges
[alias]
# Praqma Workflow http://www.praqma.com/stories/a-pragmatic-workflow/ (Phlow)
addremove = add -A .
deliver = "!BRANCH=`git symbolic-ref --short HEAD`;REMOTEBRANCH=ready/$BRANCH; git push origin $BRANCH:$REMOTEBRANCH && git branch -m delivered/$BRANCH"
co = checkout
wrapup = "!f() { MSG='close #'`git symbolic-ref --short HEAD | sed 's/-/ /g'`; echo $MSG > ~/WRAPUP_EDITMSG; git addremove; git commit -F ~/WRAPUP_EDITMSG; rm ~/WRAPUP_EDITMSG; }; f"
purge-all-delivered = "!f() { git co `git default-branch`; git branch | grep 'delivered/' | sed 's/delivered\\///g' | xargs -I %br sh -c 'git branch -D delivered/%br; git push origin :%br' 2>/dev/null; }; f "
default-branch = "!f(){ if git show-ref refs/heads/master >/dev/null 2>&1; then echo master; elif git show-ref refs/heads/gh-pages >/dev/null 2>&1; then echo gh-pages; fi; }; f"
issue-branch = "!f() { MATCH=#$1:; ghi show $1 2>/dev/null | grep $MATCH | sed s/$MATCH/$1/g | sed 's/ /-/g' | sed s/[:\\']//g; }; f"
issue-wip = "!f() { ghi label $1 'Status - in progress'; }; f"
work-on = "!f() { BRANCH=`git issue-branch $1`; git fetch origin; git co $BRANCH 2> /dev/null || git co -b $BRANCH origin/`git default-branch`; git issue-wip $1; ghi assign $1; }; f"
# in case of fire
panic = !PD=$(date +%d%m%y-%H%M) && git add -$