#git #cli

app git-branch-stash-cli

Manage snapshots of your working directory

13 unstable releases (4 breaking)

0.11.0 Apr 3, 2023
0.10.4 Mar 16, 2023
0.10.2 Feb 1, 2023
0.10.0 Oct 3, 2022
0.9.2 Mar 23, 2022

#16 in #git-cli

Download history 4/week @ 2023-01-18 7/week @ 2023-01-25 47/week @ 2023-02-01 29/week @ 2023-02-08 26/week @ 2023-02-15 15/week @ 2023-02-22 9/week @ 2023-03-01 3/week @ 2023-03-08 70/week @ 2023-03-15 11/week @ 2023-03-22 27/week @ 2023-03-29 32/week @ 2023-04-05 24/week @ 2023-04-12 7/week @ 2023-04-19 9/week @ 2023-04-26 14/week @ 2023-05-03

59 downloads per month

MIT/Apache

48KB
1K SLoC

git-branch-stash

Manage snapshots of your working directory

codecov Documentation License Crates Status

Dual-licensed under MIT or Apache 2.0

Documentation

About

Backup and restore what your branches, including what they point at.

Example

Install

Download a pre-built binary (installable via gh-install).

Or use rust to install:

cargo install git-branch-stash-cli

Uninstall

See the uninstall method for your installer.

Once removed, git-branch-stash leaves behind:

  • .git/branch-stash

Removing this is safe and will have no effect.

Getting Started

Configuring git-branch-stash

Protected branches: These are branches like main or v3 that git-branch-stash must not modify. git-branch-stash will also rebase local protected branches against their remote counter parts.

Run git-branch-stash --protected -v to test your config

  • To locally protect additional branches, run git-branch-stash --protect <glob>.
  • When adopting git-branch-stash as a team, you can move the protected branches from $REPO/.git/config to $REPO/.gitconfig and commit it.

Pull remote when working from a fork, where upstream is a different remote than origin, run git config --add stack.pull-remote <REMOTE> to set your remote in $REPO/.git/config.

To see the config, run git-branch-stash --dump-config -.

Using

FAQ

Why don't you just ...?

Have an idea, we'd love to hear it! There are probably git operations or workflows we haven't heard of and would welcome the opportunity to learn more.

Dependencies

~18–24MB
~529K SLoC