gitgo (grimmbraten) - Make it easier to switch between git branches.

A zsh plugin to go between git branches with ease

Install

GitHub Repo stars

brew install fzf && git clone [email protected]:grimmbraten/gitgo.git $ZSH_CUSTOM/plugins/gitgo

Add gitgo to the plugin array in your .zshrc file.

plugins=(...other-plugins gitgo)

Use

Checkout a branch

gitgo
>   feature/implement-new-feature
    feature/work-in-progress
  * master
    bugfix/resolve-418-status-code-error
  What branch would you like to checkout?
  4/4
> _

Checkout a branch (and update remote references)

gitgo --fetch
>   feature/implement-new-feature
    feature/work-in-progress
  * master
    bugfix/resolve-418-status-code-error
  What branch would you like to checkout?
  4/4
> _

Checkout branch (and pull the latest changes)

gitgo feature/work-in-progress --pull
>   feature/work-in-progress
  What branch would you like to checkout?
  1/4
> feature/work-in-progress

Delete a local branch

gitgo --delete
>   feature/implement-new-feature
    feature/work-in-progress
  * master
    bugfix/resolve-418-status-code-error
  What branch would you like to delete?
  4/4
> _

Flags

--fetch / -d: Fetch and update remote-tracking references and remove any remote-tracking references that no longer exist.

--pull / -p: Either fast-forward or reconcile the divergent local branch and remove any remote-tracking references that no longer exist.

--delete / -d: Delete local fully upstream or HEAD branch.

--quiet / -q: Execute cli commands quietly.

Upgrade

GitHub last commit GitHub open issues

$ git -C $ZSH_CUSTOM/plugins/gitgo pull

Uninstall

rm -rf $ZSH_CUSTOM/plugins/gitgo

Credit

This simple zsh git plugin is possible because of the amazing junegunn/fzf command-line fuzzy finder.

Download Source Code

Download ZIP
Feb 2, 2022