like pushd, but for git branches
Clone or download
Paul Woolcock
Paul Woolcock update lock file
Latest commit 01827ae Jan 24, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Add `-l/--list` option to `popb` Jan 23, 2019
.gitignore Initial commit Jul 26, 2018
Cargo.lock update lock file Jan 24, 2019
Cargo.toml oops, Update to v0.2.2 Jan 24, 2019
LICENSE Initial commit Jul 26, 2018
README.adoc Clean up readme a little bit Jul 26, 2018

README.adoc

pushb/popb

This is a small cli utility that works similarly to pushd/popd, except on git branches instead on the working directory

Example

> mkdir test-repo
> cd test-repo
> git init
Initialized empty Git repository in /home/pwoolcoc/tmp/test-repo/.git/
> touch test
> git add test
> git commit -m'initial commit'
[master (root-commit) 4e7c7ad] initial commit
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 test
> pushb -b my-new-branch
Switched to a new branch 'my-new-branch'
> pushb master
Switched to branch 'master'
> popb
Switched to branch 'my-new-branch'
> popb
Switched to branch 'master'

Install

$ cargo install pushb

Use

$ pushb <branch to switch to>
$ pushb -b <branch to create then switch to>
$ popb