forked from mynameisrufus/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgitconfig.template
63 lines (63 loc) · 1.76 KB
/
gitconfig.template
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
[user]
name = ${user_name}
email = ${user_email}
[github]
user = ${github_username}
[diff]
renames = copies
[color]
branch = auto
diff = auto
status = true
ui = true
[core]
excludesfile = ~/.gitignore
autocrlf = input
pager = less -F -X # https://stackoverflow.com/a/14118014/474411
[alias]
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
clg = log --pretty=format:"%h%x09%an%x09%ad%x09%s"
slg = log --name-status --pretty=oneline
flg = log --graph --pretty=format:'%Cblue%h%d%Creset %ar %Cgreen%an%Creset %s'
f = fetch -v
co = checkout
s = status
st = stash
c = commit
d = diff
a = add
b = branch
l = log
m = merge
p = push
rb = rebase
r = reset
sh = show
t = tag
w = whatchanged -p
cp = cherry-pick
ch = cherry
bp = buildpackage
gh = !sh -c 'git clone git://github.com/$1/$2.git' -
up = pull --rebase
reopen = !sh -c 'mvim -p $(git d --name-only HEAD~1..HEAD)' -
dn = diff --name-only
echo-remote-proto-and-host = "!f(){ REMOTE=origin; git remote -v | grep $REMOTE | head -n1 | sed -E \"s/^$REMOTE\\t+([a-z]+):\\/\\/([^\\/]+).*/protocol=\\1\\nhost=\\2/\";};f"
clear-credentials = "!f(){ git echo-remote-proto-and-host | git credential-osxkeychain erase ;};f"
get-credentials = "!f(){ git echo-remote-proto-and-host | git credential-osxkeychain get ;};f"
update-password = "!f(){ (git echo-remote-proto-and-host; git get-credentials) | sed \"s/password=.*/password=$1/\" | git credential-osxkeychain store ;};f"
[push]
default = current
[credential]
helper = osxkeychain
[branch]
sort = -committerdate
[rebase]
autosquash = true
autostash = true
[pull]
rebase = true
[advice]
skippedCherryPicks = false
[pager]
branch = false