Skip to content

Instantly share code, notes, and snippets.

@hans2103
Last active December 30, 2015 18:49
Show Gist options
  • Save hans2103/7870517 to your computer and use it in GitHub Desktop.
Save hans2103/7870517 to your computer and use it in GitHub Desktop.
my .gitconfig
[color]
status = auto
diff = auto
branch = auto
interactive = auto
ui = true
[alias]
amend = !"git commit --amend -C HEAD"
st = status
ci = commit
co = checkout
br = branch
l = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
sm = log --summary
pp = push production +master:refs/heads/master
# hard reset
rshard = reset --hard HEAD
# undo last commit keeping files in stage
undolast = reset --soft HEAD^
untracked = ls-files . --exclude-standard --others
ignored = ls-files . --ignored --exclude-standard --others
# unstage file
unstage = reset HEAD
# unstage and remove local changes
discard = checkout HEAD
# show git aliases
aliases = config --get-regexp alias
# list contributor stats for this repo
contributors = !git shortlog -n -s --no-merges $@ | cat - && echo && echo total $(git rev-list --count HEAD)
# decorated graph view of one liner summarized commits from all branches. (inspired by git-extras)
tree = log --all --graph --decorate --oneline --simplify-by-decoration
[user]
name = Hans Kuijpers
email = hans2103@gmail.com
[core]
excludesfile = ~/.gitignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment