Crates.io | lazy-git-checkout |
lib.rs | lazy-git-checkout |
version | 0.1.3 |
source | src |
created_at | 2024-01-25 02:11:22.370968 |
updated_at | 2024-01-26 17:52:14.725653 |
description | Change branches while stashing and unstashing changes |
homepage | https://github.com/manuelpepe/lazy-git-checkout |
repository | https://github.com/manuelpepe/lazy-git-checkout |
max_upload_size | |
id | 1113306 |
size | 53,825 |
Small program for quickly switching between branches, stashing and unstaging your last changes.
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 ...
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
$ lazy-git-commit -A . # add project in current directory
$ lazy-git-commit # launch ui
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 |