Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
276 lines (235 sloc) 7.79 KB
; ----------------
; General Settings
; ----------------
[user]
name = Filipe Kiss
useConfigOnly = true
[github]
user = filipekiss
[dotfiles]
decrypted = false
[include]
path = ~/.gitconfig.local
[alias]
ahead = outgoing
behind = incoming
a = add -v
amend = commit --amend -C HEAD
ap = add -p
assume = update-index --assume-unchanged
assumed = "!git ls-files -v | grep ^h | cut -c 3-"
br = branch
branch-name = rev-parse --abbrev-ref HEAD
changelog = log --reverse --no-merges --format='* %s'
ci = commit
co = checkout
conflict = diff --name-only --diff-filter=U
count = rev-list --count
current = "!git branch-name"
d = diff --patch-with-stat
dc = diff --patch-with-stat --staged
discard = checkout --
# Diff minified files
dm = diff --patch-with-stat --word-diff-regex=.
fix-last = commit --fixup=HEAD --no-verify
gr = log --graph --full-history --all --color --decorate
ici = commit --allow-empty -m \":tada: Initial Commit\" --no-verify
ignored = ls-files --others -i --exclude-standard
last = "log -1 -p"
latest-tag = "!git describe --tags `git rev-list --tags --max-count=1`"
lg = log --all --color=always --graph --pretty=format:'%Cblue%h%Creset -%C(yellow)%d%Creset %C(white)%s%C(reset)%Cgreen(%cr) %C(bold blue)<%an [%G?]>%Creset' --abbrev-commit --date=auto:human
l = log --color=always --abbrev-commit --oneline
lon = log --color=always --oneline --name-only
unmerged = branch --no-merged
merged = branch --merged
ours = "!f() { git checkout --ours $@ && git add $@; }; f"
ps = push --set-upstream
purr = pull --rebase
rba = rebase --abort
rbc = rebase --continue
rbs = rebase --skip
rci = commit --amend --no-edit
root = rev-parse --show-toplevel
st = status -sb
tags = tag -l
theirs = "!f() { git checkout --theirs $@ && git add $@; }; f"
unassume = update-index --no-assume-unchanged
unpushed = log @{u}..
unstage = reset HEAD
update-submodules = "!git submodule -q foreach git pull -q origin master"
van = add -vAn
w = whatchanged --pretty=format:\"%C(blue)%h %Creset- %C(green)(%cr) %C(cyan)<%aN> %Creset%aE %C(magenta)%d %n %C(yellow)%s %n%Creset\" --date=auto:human
wip = rebase -i @{u}
who = shortlog -sne
wipe = !git reset --hard HEAD && git clean -fd
ctags = !~/.dotfiles/sidekicks/git/hooks/utils/ctags
unpushed-branches = log --branches --not --remotes --no-walk --decorate --oneline
ff = merge --ff-only
undo-last = reset head~
; --
; UI
; --
[color]
diff = auto
interactive = auto
ui = true
[color "branch"]
current = magenta italic bold reverse # I know, I know
local = cyan
remote = green
[color "diff"]
meta = yellow italic
frag = magenta italic dim
old = red strike
new = green italic
commit = blue italic
whitespace = red reverse
oldmoved = cyan strike dim
oldmovedalternative = yellow strike dim
newmoved = cyan italic dim
newmovedalternative = yellow italic dim
[color "status"]
header = yellow bold italic dim
added = green bold
changed = blue bold
untracked = red bold
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
[color "interactive"]
prompt = blue italic
[pager]
diff = diff-so-fancy | less --tabs=4 -RFX --pattern '^(Date|added|deleted|modified|renamed): '
show = diff-so-fancy | less --tabs=4 -RFX --pattern '^(Date|added|deleted|modified|renamed): '
; Disable a few of Git help messages
[advice]
statusHints = false ; Disable "how to stage/unstage/add" hints
pushNonFastForward = false ; Disable fast-forward advice (Still show the push was rejected)
waitingForEditor = false ; Disable the "hint... waiting for your editor" message
; This will format the text when rebasing interactively like the example below:
; pick a5bce56 [Filipe K..] Ensure socket is valid .. [.. 4 Jan 2018 17:06:55 -0200]
[rebase]
instructionFormat = [%<(10,trunc)%aN] %<(30,trunc)%s [%<(28,ltrunc)%cD]
autosquash = true
autoStash = true
; -------------------
; Git System Settings
; -------------------
[core]
excludesfile = ~/.dotfiles/sidekicks/git/.gitignore
filemode = false
mergeoptions = --no-edit
untrackedCache = true ; https://news.ycombinator.com/item?id=11388479
editor = $EDITOR
whitespace = trailing-space,space-before-tab ; Git will check for whitespace at $ and mixed spaces and tabs
hooksPath = ~/.dotfiles/sidekicks/git/hooks
eol = lf
; --------------
; Best Practices
; --------------
[tag]
forceSignAnnotated = true ; Always force annotated tags to be gpg signed
[commit]
gpgsign = true ; always sign the commit with the gpg key
verbose = true ; show the full-diff when editing the commit message
[push]
default = current ; by default push to a branch of the same name as the current
followTags = true ; push tags automatically
[fetch]
prune = true ; remove orphan references
[branch]
autosetuprebase = always
autosetupmerge = always
[merge]
stat = true ; show diffstat after every merge
log = 1000 ; append commit messages to merge message
renormalize = true
tool = fugitive
[pull]
rebase = true ; rebase by default
[diff]
renames = copies ; allow git to do basic copy/rename detection
mnemonicprefix = true ; git diff uses mnemonics (<i>ndex, <w>ork tree…) instead of a/b notation
colorMoved = zebra ; show moved hunks in two different colors
algorithm = histogram ; histogram is kinda faster than the default
tool = fugitive
; Record resolved conflicts
; -------------------------
; This option allows git to record steps to resolve conflicts, so identical
; hunks will be automatically resolved later on
[rerere]
enabled = true
[protocol "keybase"]
allow = always
; URL shorthands
[url "git@github.com:"]
insteadOf = gh:
pushInsteadOf = github:
pushInsteadOf = git://github.com/
[url "git://github.com/"]
insteadOf = github:
[url "git@gist.github.com:"]
insteadOf = gst:
pushInsteadOf = gist:
pushInsteadOf = git://gist.github.com/
[url "git://gist.github.com/"]
insteadOf = gist:
[url "git@github.com:filipekiss/"]
insteadOf = me:
pushInsteadOf = me:
pushInsteadOf = https://github.com/filipekiss/
pushInsteadOf = http://github.com/filipekiss/
pushInsteadOf = git://github.com/filipekiss/
[url "git@gitlab.com:"]
insteadOf = gitlab:
insteadOf = git://gitlab.com/
pushInsteadOf = git://gitlab.com/
pushInsteadOf = https://gitlab.com/
pushInsteadOf = http://gitlab.com/
[url "git@gitlab.com:"]
insteadOf = gl:
pushInsteadOf = gitlab:
pushInsteadOf = git://gitlab.com/
[url "git://gitlab.com/"]
insteadOf = gitlab:
[url "git@gitlab.com:filipekiss/"]
insteadOf = mel:
pushInsteadOf = mel:
pushInsteadOf = https://gitlab.com/filipekiss/
pushInsteadOf = http://gitlab.com/filipekiss/
pushInsteadOf = git://gitlab.com/filipekiss/
[url "git@bitbucket.org:"]
insteadOf = bb:
pushInsteadOf = bitbucket:
pushInsteadOf = git://bitbucket.org/
[url "git://bitbucket.org/"]
insteadOf = bitbucket:
insteadOf = https://bitbucket.org/
pushInsteadOf = https://bitbucket.org
[diff "plist"]
textconv = plutil -convert xml1 -o -
[filter "spabs"]
clean = expand -t 4
smudge = expand -t 4
required = true
[filter "tabace"]
clean = unexpand -t 4
smudge = unexpand -t 4
required = true
[submodule]
recurse = true
[log]
mailmap = true
date = local
[mergetool "fugitive"]
cmd = nvr -s -d $LOCAL $BASE $REMOTE $MERGED -c \"wincmd H | wincmd =\"
[difftool "fugitive"]
cmd = nvr -s -d $LOCAL $REMOTE -c \"wincmd H | wincmd =\"
[difftool]
prompt = false
[mergetool]
prompt = false
[status]
showUntrackedFiles = all
You can’t perform that action at this time.