Skip to content

Instantly share code, notes, and snippets.

@rbartoli rbartoli/.gitconfig
Created Mar 28, 2015

Embed
What would you like to do?
[alias]
# View abbreviated SHA, description, and history graph of the latest 20 commits
l = log --pretty=oneline -n 50 --graph --abbrev-commit
# View the current working tree status using the short format
s = status -s
# Show the diff between the latest commit and the current state
d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"
# Commit all changes
cm = !git add -A && git commit -m
# Switch to a branch, creating it if necessary
go = checkout -B
# Show verbose output about tags, branches or remotes
tags = tag -l
branches = branch -a
remotes = remote -v
[apply]
# Detect whitespace errors when applying a patch
whitespace = fix
[core]
# autocrlf = input
# Use custom `.gitignore` and `.gitattributes`
excludesfile = ~/.gitignore
attributesfile = ~/.gitattributes
# Treat spaces before tabs, lines that are indented with 8 or more spaces, 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
trustctime = false
whitespace = space-before-tab,indent-with-non-tab,trailing-space
editor = subl -n -w
[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
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan
[merge]
# Include summaries of merged commits in newly created merge commit messages
log = true
[push]
default = simple
[user]
name = <YOUR NAME>
email = <YOUR EMAIL>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.