Skip to content

Instantly share code, notes, and snippets.

@suzuken
Created October 3, 2013 11:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save suzuken/6808612 to your computer and use it in GitHub Desktop.
Save suzuken/6808612 to your computer and use it in GitHub Desktop.
gitのalias 参考サイトもみてください
[alias]
# http://oli.jp/2012/git-powerup/
# http://blog.blindgaenger.net/advanced_git_aliases.html
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/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment