GithubHelp home page GithubHelp logo

manuelpepe / lazy-git-checkout Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 918 KB

Quickly switching between branches, stashing and unstaging your last changes

License: MIT License

Rust 99.52% Shell 0.48%

lazy-git-checkout's Introduction

lazy-git-checkout

Small program for quickly switching between branches, stashing and unstaging your last changes.

demo gif

Changing branches with lgc is similar to doing:

git stash -m $CUR_BRANCH
git checkout $NEXT_BRANCH
git stash pop $LAST_NEXT_BRANCH_STASH_REF

but with hopefully fewer keystrokes.

It also allows you to track your most used branches to avoid any git branch | grep ...

Installing

From crates.io:

cargo install lazy-git-checkout

From source:

git clone https://github.com/manuelpepe/lazy-git-checkout.git
cd lazy-git-checkout
cargo install --path .

Make sure to have cargo's bin directory in your PATH. Additionally alias for easier access:

alias lg=lazy-git-checkout

Usage

$ lazy-git-commit -A .  # add project in current directory
$ lazy-git-commit       # launch ui

Keybinds:

Key Mode: Checkout Mode: Search Mode: Add
ESC Set Mode: Checkout Set Mode: Checkout
Enter Checkout to branch Checkout to branch Add branch to lgc known branches
Backspace Delete char Delete char Delete char
ArrUp Move selection up Move selection up Move selection up
ArrDown Move selection down Move selection down Move selection down
Shift+ArrUp Swap selection up
Shift+ArrDown Swap selection down
q Exit app
a Set Mode: Add
? Set Mode: Search
r Remove branch from known branches
k Move selection up
j Move selection down
K Swap selection up
J Swap selection down

lazy-git-checkout's People

Contributors

manuelpepe avatar

Watchers

 avatar

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.