Skip to content

Instantly share code, notes, and snippets.

@nch3v
Last active January 29, 2018 20:33
Show Gist options
  • Save nch3v/54bcc9b18994bd8e7b0e3bf6912aefe2 to your computer and use it in GitHub Desktop.
Save nch3v/54bcc9b18994bd8e7b0e3bf6912aefe2 to your computer and use it in GitHub Desktop.
A good git configuration
[user]
name = Some One
email = some1@domain.com
[color]
# Enable colors in color-supporting terminals
ui = auto
[alias]
st = status -s
ci = commit
lg = log --graph --date=relative --pretty=tformat:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%an %ad)%Creset'
oops = commit --amend --no-edit
review-local = "!git lg @{push}.."
[core]
editor = nano
excludesfile = ~/.gitignore_global
autocrlf = input
[fetch]
prune = true
[push]
default = upstream
[pull]
# This is GREAT… when you know what you're doing and are careful
# not to pull --no-rebase over a local line containing a true merge.
# rebase = true
# WARNING! This option, which does away with the one gotcha of
# auto-rebasing on pulls, is only available from 1.8.5 onwards.
rebase = preserve
[color "branch"]
# Blue on black is hard to read in git branch -vv: use cyan instead
upstream = cyan
[diff]
# Use better, descriptive initials (c, i, w) instead of a/b.
mnemonicPrefix = true
# Show renames/moves as such
renames = true
# When using --word-diff, assume --word-diff-regex=.
wordRegex = .
# Display submodule-related information (commit listings)
submodule = log
[mergetool]
keepBackup = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment