forked from stianeikeland/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitconfig
More file actions
98 lines (87 loc) · 2.54 KB
/
Copy path.gitconfig
File metadata and controls
98 lines (87 loc) · 2.54 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
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
86
87
88
89
90
91
92
93
94
95
96
97
98
[user]
name = Stian Eikeland
email = stian@eikeland.se
[github]
user = stianeikeland
token = !security 2>&1 >/dev/null find-generic-password -gs github.token | ruby -e 'print $1 if STDIN.gets =~ /^password: \\\"(.*)\\\"$/'
password = !security 2>&1 >/dev/null find-generic-password -gs github.password | ruby -e 'print $1 if STDIN.gets =~ /^password: \\\"(.*)\\\"$/'
[alias]
co = checkout
l = log --graph --pretty=format':%C(yellow)%h%Cblue%d%Creset %s %C(white) %an, %ar%Creset'
ll = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
loll = log --graph --decorate --pretty=oneline --abbrev-commit
lol = !git --no-pager loll
lolal = log --graph --decorate --pretty=oneline --abbrev-commit --all
lola = !git --no-pager lolal
# Commit all changes
ca = commit -a
# Status
s = status -s
# Clone a repository including all submodules
c = clone --recursive
# Diff
d = diff
noff = merge --no-ff
word-diff = diff --word-diff
# Merging shortcuts:
ours = "!f() { git checkout --ours $@ && git add $@; }; f"
theirs = "!f() { git checkout --theirs $@ && git add $@; }; f"
# Forget that a file was changed (avoid checking in config / passwords /etc)
assume = update-index --assume-unchanged
unassume = update-index --no-assume-unchanged
assumed = "!git ls-files -v | grep ^h | cut -c 3-"
# Legit stuff (from brew):
switch = !legit switch \"$@\"
branches = !legit branches
sprout = !legit sprout \"$@\"
unpublish = !legit unpublish \"$@\"
harvest = !legit harvest \"$@\"
sync = !legit sync \"$@\"
publish = !legit publish \"$@\"
graft = !legit graft \"$@\"
# Pull
pl = pull
plo = pull --rebase origin
plom = pull --rebase origin master
plog = pull --rebase origin gh-pages
plu = pull --rebase upstream
plum = pull --rebase upstream master
plug = pull --rebase upstream gh-pages
# Push
ps = push
pso = push origin
psom = push origin master
psog = push origin gh-pages
psu = push upstream
psum = push upstream master
psug = push upstream gh-pages
# Sync
sync = plu && pso
[color]
branch = auto
diff = auto
status = auto
ui = 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
[diff]
patience = true
[merge]
# Include summaries of merged commits in newly created merge commit messages
log = true
[core]
autocrlf = false
editor = subl -n -w
[push]
default = upstream