-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
168 lines (161 loc) · 5.04 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# vim: set expandtab:
[color]
ui = true
[alias]
st = status -sb
ci = commit -v
co = checkout
di = diff
dc = diff --cached
amend = commit --amend
a = add -u
aa = add --all
ff = merge --ff-only
pullff = pull --ff-only
noff = merge --no-ff
fa = fetch --all
pom = push origin master
b = branch
d = diff -w
ds = diff --stat=160,120
dh1 = diff HEAD~1
di = diff
#Divergence (commits we added and commits remote added)
div = divergence
#Goodness (summary of diff lines added/removed/total)
gn = goodness
gnc = goodness --cached
# Fancy logging
# h = head
# hp = head with patch
# r = recent commits, only current branch
# ra = recent commits, all reachable refs
# l = all commits, all reachable refs
head = !git l -1
h = !git head
hp = "!/bin/bash -c 'source ~/.githelpers && show_git_head'"
r = !git l -30
ra = !git r --all
l = "!/bin/bash -c 'source ~/.githelpers && pretty_git_log'"
la = !git l --all
lc = rev-parse HEAD
ctags = !.git/hooks/ctags
standup = log --since=yesterday --author 'ecerulm\\|ruben\\|Ruben'
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
purr = pull --rebase
ready = rebase -i @{u}
rebasebranch = !git rebase -i $(git merge-base HEAD master)
fold = !sh -c '_CURRENT_BRANCH=$(git symbolic-ref --short HEAD) && git checkout ${1-master} && git merge --no-ff ${2-$_CURRENT_BRANCH}' -
undomerge = reset --merge ORIG_HEAD
diffbase = !cd ${GIT_PREFIX:-.} && git diff $(git merge-base HEAD ${1-origin/master}) ${1-origin/master}
pristine = !sh -c 'git reset --hard $1 && git clean -qdfx && git status' -
diffmaster = !git diff $(git merge-base --fork-point master) # Current branch from fork point
# From https://robots.thoughtbot.com/streamline-your-git-workflow-with-aliases
c = commit -m
cob = checkout -b
up = !git fetch origin && git rebase origin/master
ir = !git rebase -i origin/master
done = !git fetch && git rebase origin/master && git checkout master && git merge @{-1}
god = log --graph --oneline --decorate
track = "!f() { ([ $# -eq 2 ] && ( echo \"Setting tracking for branch \" $1 \" -> \" $2;git branch --set-upstream $1 $2; ) || ( git for-each-ref --format=\"local: %(refname:short) <--sync--> remote: %(upstream:short)\" refs/heads && echo --Remotes && git remote -v)); }; f"
# difftool diffstastic
dft = difftool
dlog = "!f() { GIT_EXTERNAL_DIFF=difft git log -p --ext-diff $@;}; f"
[merge]
tool = meld
stat = true
[http]
sslVerify = true
[core]
editor = nvim
excludesfile = ~/.gitignore
autocrlf = false
safecrlf = warn
longpaths = true
pager = diff-so-fancy | less --tabs=4 -RF
[init]
templatedir = ~/.git_template
defaultBranch = master
[pager]
difftool = true
[push]
default = current
followTags = true
autoSetupRemote = true
[filter "media"]
clean = git-media-clean %f
smudge = git-media-smudge %f
[include]
; need to be git 1.9.2 for includes to work
path = .gitconfig_platform_specific
[diff]
mnemonicprefix = true
renames = copies
tool = difftastic
[http "https://gopkg.in"]
followRedirects = true
[difftool "filemerge"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
[credential "https://git-codecommit.eu-north-1.amazonaws.com"]
provider = generic
[difftool "Kaleidoscope"]
cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
[difftool "difftastic"]
cmd = difft "$LOCAL" "$REMOTE"
[difftool]
prompt = false
trustExitCode = true
[mergetool "Kaleidoscope"]
cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot
trustExitCode = true
[mergetool]
prompt = false
[mergetool "diffmerge"]
trustExitCode = true
path = /usr/local/bin/diffmerge
cmd = diffmerge --merge --caption $(basename $MERGED) -t1=FROM_BRANCH -t2=MERGED -t3=DEST_BRANCH --result=\"$MERGED\" \"$LOCAL\" \"$BASE\" \"$REMOTE\"
[mergetool "kdiff3"]
path = /usr/local/bin/kdiff3
cmd = kdiff3 --L1 \"FORKPOINT\" --L2 \"SOURCE_BRANCH\" --L3 \"DESTINATION_BRANCH\" \"$BASE\" \"$LOCAL\" \"$REMOTE\" -o \"$MERGED\"
trustExitCode = true
[mergetool "opendiff"]
path = /usr/bin/opendiff
cmd = "opendiff \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\" "
trustExitCode = false
[mergetool "meld"]
path = /usr/local/bin/meld
cmd = "meld --auto-merge \"$LOCAL\" \"$BASE\" \"$REMOTE\" --output \"$MERGED\" "
trustExitCode = false
[gpg]
program = gpg
[commit]
gpgsign = true
[pull]
rebase = true
[user]
name = Ruben Laguna
email = [email protected]
[include]
path = ~/.gitconfig.thismachine
[credential]
; helper = osxkeychain
credentialStore = keychain
helper = /usr/local/share/gcm-core/git-credential-manager
[interactive]
diffFilter = diff-so-fancy --patch
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
[color "diff"]
meta = 11
frag = magenta bold
func = 146 bold
commit = yellow bold
old = red bold
new = green bold
whitespace = red reverse
[credential "https://dev.azure.com"]
useHttpPath = true