Easy git branch switching workflow for Alfred
- Start the gitBranches workflow using the keyword
gb
- Enter the path to your local repository (or a repository bookmark - see below) followed by a search string
Example:
gb /path/to/repo searchString
- gitBranches stashes your local changes on your current branch (you can easily get them back with
git stash pop
) - gitBranches will fetch any new remote branch names and list all available branches for your repository. As you type your search string this will filter down to only branch names which match your search string (case insensitive)
- When you select a branch, git will checkout the selected branch in your repo. No terminal, or GUI required :)
- gitBranches stashes your local changes on your current branch (you can easily get them back with
- Start the gitBranches bookmark workflow using the keyword
gbookmark
- Enter the path to the local repository you want to bookmark, followed by the bookmark name you want to use. Note bookmark names may not contain spaces.
Example:
gbookmark /path/to/repo bookmarkName
- Press enter and the bookmark will be saved. You can now avoid typing lengthy paths when switching branches and use your bookmark name instead.
Example:
gb bookmarkName searchString