-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitconfig
80 lines (66 loc) · 1.93 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
[core]
excludesfile = "~/.gitignore"
editor = vim
autocrlf = input
whitespace = cr-at-eol
[commit]
verbose = true
[merge]
defaultToUpstream = true
keepBackup = false
tool = p4merge
[mergetool "p4merge"]
cmd = p4merge "$BASE" "$LOCAL" "$REMOTE" "$MERGED"
keepTemporaries = false
trustExitCode = false
keepBackup = false
[include]
# Put machine local configuration here like the [user] variables
path = ~/.gitconfig.local
[alias]
# log commands
logp = log --patch-with-stat
logs = log --stat --no-merges
logg = log --graph --all --branches --date-order
log1 = "log --oneline --relative-date --pretty=format:\"%Cgreen%h%Creset by %Cred%an%Creset, %ai: %s\""
lognew = log --format='format:%Cgreen%h%Creset, %ai, %Cgreen%an%Creset: %s' --stat HEAD..origin/master
lognewp = log --format='format:%Cgreen%h%Creset, %ai, %Cgreen%an%Creset: %s' -p HEAD..origin/master
logt = log --topo-order
whichmerge = "!f() { git log ${1}..$(git rev-parse --symbolic --abbrev-ref HEAD) --ancestry-path --merges --reverse --oneline | head -n 1; }; f"
unstage = reset HEAD
ls-untracked = ls-files --other --exclude-standard
# search
search = "!f() { A1=$1; shift; git logp -S\"$A1\" $@; }; f"
# Gary B´s fast-forward aliases
ff = merge --ff-only
pullff = pull --ff-only
noff = merge --no-ff
fa = fetch --all
pom = push origin master
pod = push origin develop
[format]
pretty=%C(yellow)commit: %h%Cblue%d%Creset%nAuthor: %an%nDate: %ad%n%n%w(0,4,4)%s%n%b
[color]
ui = true
branch = auto
diff = auto
status = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = blue
frag = magenta
old = red
new = green
[color "status"]
added = green
changed = magenta
untracked = reverse
[push]
default = current
[diff]
noprefix = true
[pull]
ff = only