Code Monkey home page Code Monkey logo

node-gitcheckout-cli's Introduction

gitcheckout

This simple CLI tool will prompt you to conveniently choose a git branch, using keyboard arrows navigation, and check it out like a boss.

Why??

Because we're lazy. And sometimes you're so dedicated to writing long descriptive branch names, and so awesome you're working on 10 features at the same time. The least you can ask for is a CLI list with cool arrows navigation.

Installation

npm install -g gitcheckout-cli

Usage

In your git repo directory:

gitcheckout

If you want to choose a branch only from local branches:

gitcheckout -l

If you want to fetch first, before listing branches:

gitcheckout -f

Note: Currently, the "-f" option doesn't handle credentials prompt, and will not fetch in that case, or any other case of "git fetch" failure.

Then you'll be displayed with the available branches list. Simple pick one and hit Enter.

? Select branch to checkout: (Use arrow keys)
  develop
  hotfix/some-very-long-name-no-way-ill-remember
  feature/my-awesome-feature
  feature/gitcheckout-is-so-cool
  hotfix/fish-tacos-for-lunch
> master

When prompted, you can type in to filter results

? Select branch to checkout: fish-t
> hotfix/fish-tacos-for-lunch

Display help (yes, it has a '-h' arg)

gitcheckout -h

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.