git-checkout-branch

command module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2020 License: MIT Imports: 10 Imported by: 0

README

Build

git-checkout-branch

A cli application for interactively checking out branches

asciicast

Installation

go get -u github.com/giannimassi/git-checkout-interactive

If $GOBIN is available in your $PATH the command can be used as git checkout-interactive.

Optional

You can also add the following to your .gitconfig to provide a simpler to use alias for this command:

[alias]
    cb = checkout-interactive --sort=-committerdate

After adding this alias you can simply call this to choose a branch from the latest ones:

git cb

This is just an example, you can add flags and arguments as needed in the alias.

Usage

git checkout-interactive <git branch arguments and flags>

Displays the current branch and allows to circle through branches listed with git branch and the provided flag and arguments.

  • press down/left/j to select next branch
  • press up/right/h to select previous branch
  • press enter to checkout selected branch
  • press ESC or ctrl-c to exit without any changes
Examples
git checkout-interactive

Choose a branch to checkout among the local branches.

git checkout-interactive -a

Choose a branch to checkout among all branches, both local and remote.

git checkout-interactive --sort=-committerdate

Choose a branch to checkout among the local branches listed by most recent commit.

Have fun versioning!

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL