#git-branch #git-checkout #recent

app git-select-branch

Tiny CLI utility to checkout a recent git branch interactively

6 releases

0.2.3 Nov 15, 2023
0.2.0 Mar 17, 2023
0.1.3 Jan 27, 2023
0.1.1 May 9, 2021

#3 in #recent

MIT/Apache

715KB
486 lines

git-select-branch

Tiny Rust CLI to checkout a recent git branch interactively.

git-select-branch lets you select a recent branch interactively.

Installation

Homebrew

brew tap dnjstrom/git-select-branch
brew install git-select-branch

Cargo

cargo install git-select-branch

Sources

git clone git@github.com:dnjstrom/git-select-branch.git
cd git-select-branch
cargo install --path .

Configuration

Git alias

Add the following section to your ~/.gitconfig:

[alias]
  select-branch = "!git-select-branch"

Now you can simply type git select-branch to switch between branches.

Publishing

  1. Bump the version in Cargo.toml and commit.
  2. Publish to crates.io by running cargo publish.
  3. Run ./scripts/prepare-release-files.sh.
  4. Make a new release including:
    • The version from Cargo.toml
    • The file at ./target/release/git-select-branch-mac.tar.gz.
  5. Edit the hombrew tap with the new information:
    • The version from Cargo.toml
    • The link from the release page
    • The sha from ./target/release/git-select-branch-mac.tar.gz.shasum

Dependencies

~15–28MB
~501K SLoC