joar / git-select-branch

Tiny Rust CLI to checkout a recent git branch interactively

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 .

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

About

Tiny Rust CLI to checkout a recent git branch interactively


Languages

Language:Rust 80.9%Language:Shell 19.1%