ブランチを選択し、選択したブランチに対してアクションを実行するスクリプト
- fzfをinstall
brew install fzf
- 以下のファイルを任意の場所に置く
branch_action.sh
.zshrc
でエイリアスを貼る
// .zshrc
alias gb='~/任意の場所/branch_action.sh'
キーワード検索でステージング、アンステージングできるスクリプト
- 以下のファイルを任意の場所に置く
git_add.sh
git_reset.sh
.zshrc
でエイリアスを貼る
alias ga='~/任意の場所/git_add.sh'
alias gres='~/任意の場所/git_reset.sh'
- コマンドの後にキーワードを入れて実行する
// 例えば拡張子がjsのものだけaddする場合
ga js
// 逆に、拡張子がjsのものだけunstageする場合
gres js