GitOmit - t-sakashita/rokko GitHub Wiki
gitコマンドの省略法
エイリアスの作成
git config --global alias.co checkout
git config --global alias.st 'status'
git config --global alias.ci 'commit -a'
git config --global alias.di 'diff'
git config --global alias.br 'branch'
~/.bashrcに以下を書き込む
alias gco="git checkout"
alias gst="git status"
alias gci="git commit -a"
alias gdi="git diff"
alias gbr="git branch"
push/pullする時にブランチ名を省略する方法
リポジトリの各ブランチごとに以下を実行
git config branch.master.remote origin
git config branch.master.merge refs/heads/master
すると、.git/configに以下の2行が追記される。
[branch "master"]
remote = origin
merge = refs/heads/master
参考: http://blog.elkc.net/?p=585
引数なしで、以下のように実行できる。
git push
git pull