๐Ÿง  A command-line utility for switching git branches more easily. Switch branches interactively or use a fuzzy search to find that long-forgotten branch name.

Overview

git-smart-checkout

A git command extension for switching git branches more efficiently.

brain

Crates.io License

Demo

About

Interactively switch branches or fuzzy search for that forgotten branch name.

All powered by the speed โšก๏ธ of rust ๐Ÿฆ€ .

Installation

If you have Rust installed (using the recommended rustup installation method) then you can install the binary from the crate using cargo:

cargo install git-smart-checkout

For Homebrew users, you can install the binary using the following command:

brew tap craciuncezar/tap
brew install git-smart-checkout

You can also install the binary directly from GitHub Releases

curl -sSL https://github.com/craciuncezar/git-smart-checkout/releases/download/v0.1.0/git-smart-checkout -o /usr/local/bin/git-smart-checkout && chmod +x /usr/local/bin/git-smart-checkout

Usage

Start by running:

git smart-checkout

Once the interactive window is visible you can navigate with keyboard arrows โ†‘ or โ†“ and select the git branch you are looking for by pressing Enter. If you know the name of the branch you can start typing to search for that particular branch, the search is using a fuzzy algorithm so you don't need to match the exact name of the branch it will also match partial terms.

Git alias

To save typing time you can use a regular git alias for git smart-checkout. The following command will add the alias git sc to your git config, however feel free to use whatever works best for you:

git config --global alias.sc smart-checkout
You might also like...
Save cli commands and fuzzy find them later
Save cli commands and fuzzy find them later

crow - cli command memorizer What is crow? | Installation | Usage | FAQ What is crow? crow (command row) is a CLI tool to help you memorize CLI comman

A command line utility to easily make dank memes
A command line utility to easily make dank memes

meme-cli A command line utility to easily make dank memes. Yes, really. Installation cargo install meme-cli Alternatively, install from source using g

Fzf - A command-line fuzzy finder
Fzf - A command-line fuzzy finder

fzf is a general-purpose command-line fuzzy finder. It's an interactive Unix filter for command-line that can be used with any list; files, command hi

An i3/Sway utility to switch focus to your last focused window. Alt+Tab in i3

i3-back An i3/Sway utility to switch focus to your last focused window. Allows for behavior similar to Alt+Tab on other desktop environments. Features

A git sub-command to view your git repository in the web browser
A git sub-command to view your git repository in the web browser

git-view A git sub-command to view your git repository in the web browser! About Are you also frustrated from moving your hands away from the keyboard

argmax is a library that allows Rust applications to avoid Argument list too long errors (E2BIG) by providing a std::process::Command wrapper with a

argmax argmax is a library that allows Rust applications to avoid Argument list too long errors (E2BIG) by providing a std::process::Command wrapper w

Automatic application-aware keyboard layer switching for Windows

komokana Automatic application-aware keyboard layer switching for Windows About komokana is a daemon that listens to events emitted by komorebi and co

Automatically dim windows in Hyprland when switching between them.

hyprdim hyprdim is a daemon that automatically dims windows in Hyprland when switching between them. Features Easily see which window has focus, even

fd is a program to find entries in your filesystem. It is a simple, fast and user-friendly alternative to find
fd is a program to find entries in your filesystem. It is a simple, fast and user-friendly alternative to find

fd is a program to find entries in your filesystem. It is a simple, fast and user-friendly alternative to find. While it does not aim to support all of find's powerful functionality, it provides sensible (opinionated) defaults for a majority of use cases.

Comments
  • The documentation on Crate. io is not the same as that on Github

    The documentation on Crate. io is not the same as that on Github

    According to the documentation on Crate. IO, I tried to install the CREATE today, but it showed --> could not find smart-checkout in registry crates-io with version *

    steps:

    1. First : cargo install smart-checkout
    error: could not find `smart-checkout` in registry `crates-io` with version `*`
    
    1. then: cargo search smart-checkout
    smart-checkout = "0.0.0"        # A better way of switching git branches.
    git-smart-checkout = "0.1.0"    # A better way of switching git branches.
    
    1. so: The installation command should be cargo install git-smart-checkout , rather than cargo install smart-checkout
    ๐Ÿ’€ 97% ๐Ÿš€ โฏโฏโฏ cargo install git-smart-checkout
        Updating crates.io index
      Downloaded git-smart-checkout v0.1.0
      Downloaded 1 crate (2.0 MB) in 4.54s
    

    In fact, the Github documentation says cargo install Git-smart-checkout should be used.

    Crate.io is not consistent with github.

    opened by linqingyao 1
  • [ImgBot] Optimize images

    [ImgBot] Optimize images

    opened by imgbot[bot] 0
  • [ImgBot] Optimize images

    [ImgBot] Optimize images

    opened by imgbot[bot] 0
  • Add more git smart features

    Add more git smart features

    This is a nice tool. I wonder what you'd think about extending it to include more git features? The top one I can think of right now would be git-smart-delete:

    • Populate the same initial list of branches as git-smart-checkout
    • Instead of a fuzzy matcher, I think you'd want something like prefix matching to be able to delete multiple branches at once, or the option to choose different matchers
    • Confirm which branches are being deleted; maybe warn for ones that aren't merged yet or don't delete those by default

    I know you can just do `git branch --merged | grep -Ev "^*|main|master" | xargs git branch -d", but the more helpful UI of smart-checkout would make me feel better about cleaning up my branches, so I think this could be a good addition.

    enhancement 
    opened by cszczepaniak 1
Releases(v0.1.3)
Owner
Cezar Craciun
Cezar Craciun
Tiny Rust CLI to checkout a recent git branch interactively

git-select-branch Tiny Rust CLI to checkout a recent git branch interactively. Installation Homebrew brew tap dnjstrom/git-select-branch brew install

Daniel Strรถm 5 Oct 11, 2022
WIP: A program for switching Dygma layouts based on window name or exe name.

Dygma Layer Switcher Config On the first run of dygma-layer-switcher the config.yml will be generated. --- # Toggle logging. logging: false # Port of

Matthew Wilding 5 Nov 11, 2023
fas stand for Find all stuff and it's a go app that simplify the find command and allow you to easily search everything you nedd

fas fas stands for Find all stuff and it's a rust app that simplify the find command and allow you to easily search everything you need. Note: current

M4jrT0m 1 Dec 24, 2021
Small command-line tool to switch monitor inputs from command line

swmon Small command-line tool to switch monitor inputs from command line Installation git clone https://github.com/cr1901/swmon cargo install --path .

William D. Jones 5 Aug 20, 2022
JiaShiwen 12 Nov 5, 2022
Fuzzy a general fuzzy finder that saves you time in rust!

Life is short, skim! Half of our life is spent on navigation: files, lines, commandsโ€ฆ You need skim! It is a general fuzzy finder that saves you time.

Jinzhou Zhang 3.7k Jan 8, 2023
GitHub CLI extension to search some repos interactively.

gh activity GitHub CLI extension to search some repos interactively. It's wrapper to build gh command provided by GitHub CLI, it could search more eas

taka naoga 3 Jul 28, 2023
Integrate Mcfly with fzf to combine a solid command history database with a widely-loved fuzzy search UI

McFly fzf integration Integrate McFly with fzf to combine a solid command history database with a widely-loved fuzzy search UI Features: Advanced hist

null 11 Jan 25, 2023
Attempt to make a git profile switcher to switch profiles.

Git Profile Switcher โ–ˆโ–€โ–€โ€ƒโ–ˆโ€ƒโ–€โ–ˆโ–€โ€ƒ โ€ƒโ–ˆโ–€โ€ƒโ–ˆโ–‘โ–ˆโ–‘โ–ˆโ€ƒโ–ˆโ€ƒโ–€โ–ˆโ–€โ€ƒโ–ˆโ–€โ–€โ€ƒโ–ˆโ–‘โ–ˆโ€ƒโ–ˆโ–€โ–€โ€ƒโ–ˆโ–€โ–ˆ โ–ˆโ–„โ–ˆโ€ƒโ–ˆโ€ƒโ–‘โ–ˆโ–‘โ€ƒ โ€ƒโ–„โ–ˆโ€ƒโ–€โ–„โ–€โ–„โ–€โ€ƒโ–ˆโ€ƒโ–‘โ–ˆโ–‘โ€ƒโ–ˆโ–„โ–„โ€ƒโ–ˆโ–€โ–ˆ

Srikanth K 2 Sep 23, 2022
rpsc is a *nix command line tool to quickly search for file systems items matching varied criterions like permissions, extended attributes and much more.

rpsc rpsc is a *nix command line tool to quickly search for file systems items matching varied criterions like permissions, extended attributes and mu

null 3 Dec 15, 2022