2012年3月21日水曜日

git コマンド候補表示 + ブランチ名をプロンプトに表示

$ cp /etc/bash_completion.d/git ~/.git-completion.bash
$ vim .bashrc
# 下記 2 行を追加
source ~/.git-completion.bash
PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ '
$ source .bashrc
branchの名前を変更
git branch -m branchname
branchを削除
git branch -D branchname
リモートbranchを削除
git push --delete branchname

0 件のコメント: