Skip to content

Instantly share code, notes, and snippets.

@PallCreaker
Last active December 24, 2015 17:49
Show Gist options
  • Save PallCreaker/6837958 to your computer and use it in GitHub Desktop.
Save PallCreaker/6837958 to your computer and use it in GitHub Desktop.
git alias
[alias]
alias = !git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1\\\t => \\2/' | sort
b = branch -a
br = browse-remote
ci = commit
co = checkout
d = diff
dc = diff --cached
di = diff
dic = diff --cached
f = fetch --prune
fs = !git f && git su
ignore = !([ ! -e .gitignore ] && touch .gitignore) | echo $1 >> .gitignore
info = remote show origin
l = log --graph -n 20 --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %s %C(green)- %an, %cr%Creset'
ll = log --stat --abbrev-commit
ln = log --graph -n 20 --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %s %C(green)- %an, %cr%Creset' --name-status
lp = log --oneline -n 20 -p
ls = log --stat --abbrev-commit -n 1 # display previous log
s = status --short --branch
st = status
su = submodule update
delete-merged-branches = !git branch --merged | grep -v \\* | xargs -I % git branch -d %
fetch-pulls = fetch origin +refs/pull/*:refs/remotes/pull/*
ignore = update-index --assume-unchanged
unignore = update-index --no-assume-unchanged
ignored = !git ls-files -v | grep "^[a-z]"
# http://oli.jp/2012/git-powerup/
# http://blog.blindgaenger.net/advanced_git_aliases.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment