Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
184 lines (135 sloc) 4.42 KB
[alias]
# List aliases
aliases = config --get-regexp alias
# Staging & commiting
a = add
aa = add .
amend = commit --amend --no-edit
c = commit
discard = checkout --
discard-all = checkout -- *
unstage = reset HEAD
uncommit = reset --soft HEAD^
uncommit-hard = reset --hard HEAD^ # also undo's changes to unstaged files
revert-file = "!f() { git checkout $1 -- $2; }; f"
# Branching
co = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f" # checkout or create if non-existent
ch = checkout
cu = "!f() { git checkout $1 && git pull; }; f" # checkout and fetch remote changes
branch-rm = branch -d
branch-mv = branch -m
branch-cleanup = remote update --prune
branch-rm-remote = "!f() { git branch -d $1; git push origin --delete $1; }; f"
branch-mv-rem = "!f() { git branch -m $1 $2; git push origin --delete $1; git push --set-upstream origin $2: }; f"
branch-prune-remote = fetch origin --prune
which = !git branch | grep -i
lucky = !sh -c 'git checkout $(git which $1 -m1)' -
get-current-branch = rev-parse --abbrev-ref HEAD
update = push origin HEAD
# Remotes
pl = pull
ps = push
publish = !git push -u origin $(git get-current-branch)
ro = remote add origin
f = fetch origin
open = "!f() { open $(git remote get-url origin); }; f"
# Controlling
d = diff
filemerge = difftool -t opendiff -y
l = log
log-short = log --pretty=oneline --abbrev-commit --graph --decorate
log-short-no-merges = log-short --no-merge --first-parent
log-search = log -S
s = status
ss = status -s
stats = shortlog -sn
today = diff --shortstat "@{0 day ago}"
# Show verbose output about tags, branches or remotes
tags = tag -l
branches = branch -a
br = branch -a -v
remotes = remote -v
# Temporarily disable GPG signing for use of Github Desktop.app
nogpg = config --global commit.gpgsign false
gpg = config --global commit.gpgsign true
[apply]
# Detect whitespace errors when applying a patch
whitespace = fix
[core]
# Use custom `.gitignore` and `.gitattributes`
excludesfile = /Users/thibaultmaekelbergh/.config/.gitignore
attributesfile = ~/.gitattributes
# Treat spaces before tabs and all kinds of trailing whitespace as an error
# [default] trailing-space: looks for spaces at the end of a line
# [default] space-before-tab: looks for spaces before tabs at the beginning of a line
whitespace = space-before-tab,-indent-with-non-tab,trailing-space
# Make `git rebase` safer on OS X
# More info: <http://www.git-tower.com/blog/make-git-rebase-safe-on-osx/>
trustctime = false
# Use diff-so-fancy as the default diff viewer
pager = diff-so-fancy | less --tabs=4 -RFX
[color]
# Use colors in Git commands that are capable of colored output when
# outputting to the terminal. (This is the default setting in Git ≥ 1.8.4.)
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold # line info
old = red # deletions
new = green # additions
[color "status"]
added = yellow
changed = green
untracked = cyan
[diff]
# Detect copies as well as renames
renames = copies
[help]
# Automatically correct and execute mistyped commands
autocorrect = 1
[merge]
# Include summaries of merged commits in newly created merge commit messages
log = true
[push]
# Push only the current branch instead of all
default = current
# 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:"
[filter "media"]
required = true
clean = git media clean %f
smudge = git media smudge %f
[filter "hawser"]
clean = git hawser clean %f
smudge = git hawser smudge %f
required = true
[filter "lfs"]
clean = git lfs clean %f
smudge = git lfs smudge %f
required = true
[credential]
helper = osxkeychain
[include]
# Include extra git functions outside of $HOME/.gitconfig
path = /Users/thibaultmaekelbergh/.ext_aliases/git-conf-extends/gpg
path = /Users/thibaultmaekelbergh/.ext_aliases/git-conf-extends/git-functions
[user]
name = Thibault Maekelbergh
email = thibault.maekelbergh@icloud.com
signingkey = 0085F9B9762D25E9
gpgsign = true