Open wada811 opened 5 years ago
Git のブランチを絞り込んで選択したい。
Git
zsh のグローバルエイリアスで B に peco で Git のブランチを選択する関数を設定する。
zsh
B
peco
function peco-git-branch(){ git branch | peco | sed -e "s/^\*[ ]*//g" } alias -g B='$(peco-git-branch)'
git checkout B や git merge B など。
git checkout B
git merge B
Why
Git
のブランチを絞り込んで選択したい。What
zsh
のグローバルエイリアスでB
にpeco
でGit
のブランチを選択する関数を設定する。How
設定
使い方
git checkout B
やgit merge B
など。Ref