Skip to content

Instantly share code, notes, and snippets.

@happylinks
Last active April 8, 2017 13:34
Show Gist options
  • Select an option

  • Save happylinks/e005f227071e4d0401e69358a6201e20 to your computer and use it in GitHub Desktop.

Select an option

Save happylinks/e005f227071e4d0401e69358a6201e20 to your computer and use it in GitHub Desktop.
.gitconfig
[user]
email = happylinks@gmail.com
name = Michiel Westerbeek
[core]
editor = vim
[alias]
# one-line log
l = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short
a = add
ap = add -p
unadd = reset HEAD
c = commit --verbose
cm = commit -m
d = diff
ds = diff --stat
dc = diff --cached
s = status -s
st = status
pd = pull origin develop
pm = pull origin master
po = push origin
# list branches sorted by last modified
b = "!git for-each-ref --sort='-authordate' --format='%(authordate)%09%(objectname:short)%09%(refname)' refs/heads | sed -e 's-refs/heads/--'"
# list aliases
la = "!git config -l | grep alias | cut -c 7-"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment