git-checkout-interactive

command module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2020 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

git-checkout-interactive

A cli application for interactively checking out branches

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
⌂ 换网址