- Go to
Preferences
->Advanced
- Under
Smart Selection
, click theEdit
button - Click the
+
to add a new rule - For the Regular expression, use
^\s*(?:remotes/origin/)?([a-z0-9A-Z][a-zA-Z0-9\/\.\-\_]*)$
- For priority, choose
Very Low
- Click
Edit Actions
- Click the
+
to add a new action - Title
Switch Git Branch
- Action
Run Coprocess...
- Parameter
~/sw.sh \1
- Create
sw.sh
file in$HOME
folder with follow content:
#!/bin/bash
echo "git checkout '$1' --"