-
Notifications
You must be signed in to change notification settings - Fork 8
/
.gitconfig
115 lines (106 loc) · 3 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# vim:set noexpandtab sw=4 ts=4:
[user]
name = Ches Martin
email = ches@whiskeyandgrits.net
signingkey = 23D618B53AB8209FF172C0706E5CD3ED8638EE95
[alias]
br = branch
co = checkout
s = status --short
st = status
stat = status
ci = commit
civ = commit -v
cim = commit -m
cia = commit -a -m
amend = commit -a --amend -C HEAD
unstage = reset HEAD
df = diff
dc = diff --cached
ds = diff --staged # Saner UX of the prior...
vdiff = !git diff | view -
who = shortlog -s --
lg = log --patch
ll = log --graph --pretty=format:'%C(blue)%h %C(green)%d%Creset %s %C(black bold)%an, %ar%Creset'
glog = log --graph --stat --decorate
# 'show' does the same, I just like to have a common alias with Mercurial
last = log -1 -p HEAD
recent = log --relative --abbrev-commit --date=local --pretty=format:'%C(white)%h %C(cyan)%cr %C(green)by %cn %Creset%n%C(yellow)%cd%n%s' --stat -5
info = remote show origin
remotes = remote -v
tags = tag -l -n
k = !gitk
ctags = !.git/hooks/ctags
edit-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; $EDITOR `f`"
add-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; git add `f`"
ignore = update-index --assume-unchanged
unignore = update-index --no-assume-unchanged
ignored = !git ls-files -v | grep \"^[[:lower:]]\"
ls-ignored = ls-files --others --ignored --exclude-standard
# Restore a dropped stash by SHA https://stackoverflow.com/a/6455586/455009
restash = !git update-ref -m $(git log -1 --pretty=format:'%s' $1) refs/stash $1
up = !sh -c 'git pull && git log --pretty=format:"%Cred%ae %Creset- %C(yellow)%s %Creset(%ar)" HEAD@{1}..'
[branch]
autosetupmerge = true
[core]
whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol
autocrlf = false
[init]
templatedir = ~/.config/git/templates
[rebase]
autosquash = true
[rerere]
enabled = true
[status]
submodulesummary = 1
[diff]
tool = vimdiff
guitool = gvimdiff
[difftool]
prompt = false
[merge]
summary = true
tool = vimdiff
[mergetool]
prompt = false
[mergetool "kdiff3"]
trustExitCode = false
keepBackup = false
[color]
ui = auto
[color "branch"]
current = yellow
remote = magenta
[color "diff"]
whitespace = red reverse
[color "sh"]
workdir = green bold
branch = cyan reverse
[gui]
fontdiff = -family Monaco -size 11 -weight normal -slant roman -underline 0 -overstrike 0
[github]
user = ches
[instaweb]
httpd = webrick
port = 8000
[web]
browser = open
# Git Large File Support
[filter "lfs"]
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
# Settings for "avh" version of git-flow
# https://github.com/petervanderdoes/gitflow-avh/wiki/Reference:-Configuration
#
# Deleting remote branches before pushing their merge makes GitHub fail
# to indicate pull requests as merged instead of closed. So don't do that.
[gitflow "feature.finish"]
keepremote = true
[gitflow "release.finish"]
keepremote = true
[gitflow "hotfix.finish"]
keepremote = true
[includeIf "gitdir:~/src/agoda/"]
path = ~/src/agoda/.gitconfig