Skip to content

Instantly share code, notes, and snippets.

@omichelsen
Created March 26, 2014 08:54
Show Gist options
  • Save omichelsen/9779103 to your computer and use it in GitHub Desktop.
Save omichelsen/9779103 to your computer and use it in GitHub Desktop.
Git config
[alias]
st = status
ci = commit
co = checkout
br = branch
alias = config --get-regexp alias
lg = log --graph --decorate --pretty=oneline --abbrev-commit
lgf = log --graph --pretty=format:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(cyan)<%an>%Creset' --abbrev-commit --date=relative
unstage = reset HEAD
uncommit = reset --soft HEAD^
# When doing "git git log" or some such, do not complain about "git" not
# being a valid Git command. This happens when copy-pasting examples, for
# instance.
git = !git
# Quickly view the latest commits in a multicolour oneliner format that
# highlights the parts I care about most: SHA, description and branch.
l = log --pretty=concise -n 20
# Like "git l", but show all and draw the history graph, too.
ll = log --pretty=concise --graph
# Show a concise status of the working directory, along with the branch
# and the number of commits behind and/or ahead.
s = status --short --branch
[pretty]
concise = %C(yellow)%h%C(reset) %s %C(dim white)(%an, %ar)%C(reset)%C(bold blue)%d%C(reset)
[user]
name = Ole Bjørn Michelsen
email = [email protected]
[filter "media"]
clean = git-media-clean %f
smudge = git-media-smudge %f
[core]
excludesfile = ~/Dropbox/conf/.gitignore_global
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[credential]
helper = osxkeychain
[push]
default = simple
[include]
path = .gitlocal
[color]
ui = true
[branch "master"]
remote = origin
rebase = true
merge = refs/heads/master
[branch]
autosetuprebase = always
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment