-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig
69 lines (63 loc) · 1.92 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
[init]
templatedir = ~/.git_template
[push]
default = current
[alias]
aa = add --all
ap = add --patch
amend = commit --amend
branches = for-each-ref --sort=-committerdate --format=\"%(color:blue)%(authordate:relative)\t%(color:red)%(authorname)\t%(color:white)%(color:bold)%(refname:short)\" refs/remotes
ci = commit -v
co = checkout
pf = push --force-with-lease
st = status
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
b = branch
ds = diff --stat=160,120
dh1 = diff HEAD~1
l = log --pretty=colored
mh = log -S # method history
fh = log --follow -p --
find-merge = "!sh -c 'commit=$0 && branch=${1:-HEAD} && (git rev-list $commit..$branch --ancestry-path | cat -n; git rev-list $commit..$branch --first-parent | cat -n) | sort -k2 -s | uniq -f1 -d | sort -n | tail -1 | cut -f2'"
show-merge = "!sh -c 'merge=$(git find-merge $0 $1) && [ -n \"$merge\" ] && git show $merge'"
# Show the diff between the latest commit and the current state
d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"
[core]
excludesfile = ~/.gitignore
autocrlf = input
[commit]
template = ~/.gitmessage
[fetch]
prune = true
[rebase]
autosquash = true
[user]
name = Jack McCallum
email = [email protected]
[pretty]
colored = format:%Cred%h%Creset %s %Cgreen(%cr) %C(bold blue)%an%Creset
# so much color
[color]
ui = always
[color "diff"]
meta = yellow bold
commit = green bold
frag = magenta bold
old = red bold
new = green bold
whitespace = red reverse
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = "red bold 52"
newNormal = "green bold"
newHighlight = "green bold 22"
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "status"]
added = yellow
changed = green
untracked = cyan
[include]
path = ~/.gitconfig.local