Skip to content

Instantly share code, notes, and snippets.

@smithmilner
Created June 5, 2014 19:13
Show Gist options
  • Select an option

  • Save smithmilner/ec7fbf523953ace0230a to your computer and use it in GitHub Desktop.

Select an option

Save smithmilner/ec7fbf523953ace0230a to your computer and use it in GitHub Desktop.
My general purpose git settings.
[user]
name = Smith Milner
email = smithmilner@gmail.com
# download this file in your home directory and rename it .gitconfig
[branch]
autosetuprebase = always
[color]
ui = auto
[color "status"]
added = green
changed = red bold
untracked = magenta bold
branch = green bold
[color "branch"]
current = green bold
local = yellow
remote = red bold
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
whitespace = red reverse
[core]
whitespace=fix,-indent-with-non-tab,-indent-with-tab,trailing-space,cr-at-eol
editor = vi
[alias]
co = checkout
unstage = reset HEAD
mylog = log --author="smithmilner" --since="6am" --stat
flog = log --stat
mylogall = log --author="smithmilner" --stat
df = !git diff --no-prefix && git diff --staged --no-prefix
dmdf = diff --no-prefix --relative
clear = reset --hard
st = status
lol = log --graph --decorate --oneline
lola = log --graph --decorate --oneline --all
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
search = log -S
b-in = branch -a --contains
# set files as assume unchanging (hiding changes)
hide = update-index --assume-unchanged
nohide = update-index --no-assume-unchanged
# show assumptions
hidden = "!git ls-files -v | grep ^h | cut -c 3-"
nohide-all = "!git hidden | xargs git update-index --no-assume-unchanged"
# list aliases
la = "!git config -l | grep alias | cut -c 7-"
# list local branches sorted by last modified
b = "!git for-each-ref --sort='-authordate' --format='%(authordate)%09%(objectname:short)%09%(authorname)%09%(refname)' refs/heads | sed -e 's-refs/heads/--'"
[github]
user = smithmilner
token = 2b783ca7a31dfec457f0b2103c2a00e0
[url "ssh://git@git.drupal.org/project/"]
insteadOf = "drupal:"
[url "ssh://git@git.drupal.org/sandbox/"]
insteadOf = "drupalsand:"
[rerere]
enabled = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment