1.1.0 • Published 7 years ago

stash-to-branch v1.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

stash-to-branch

A cli tool for git, which allows stashing and restoring changes to a branch

Donate Build Status semantic-release Commitizen friendly JavaScript Style Guide

Usage

Installing

Install the tool globally

npm i stash-to-branch -g

Saving

Make some changes to your project, then stash them

stash-to-branch --save foo

After this, the original branch is clean and stashed-foo holds the changes, that you've made

Push the branch to origin

git push origin stashed-foo

Restoration

Make sure, that the stashed branch is available locally by pulling it from origin

git fetch

git checkout stashed-foo

git pull origin stashed-foo

Go to any branch, where you want to re-apply the changes from a stash and do a restore

stash-to-branch --restore foo

After this, the changes from stashed-foo are applied to your branch and you are ready to continue working with your code

Feel free to delete stashed-foo from local and remote, when you no longer need it

Arguments

--save or -s or --stash

Saves the local changes of the current branch to "stashed-". The "stashed-" prefix can be overriden by the --prefix argument.

--restore or -r or --apply

Applies the changes of "stashed-" to the current branch and prepares them for staging. No commit is being done on the current branch. The "stashed-" prefix can be overriden by the --prefix argument.

--list or -l

List all the available branches, which start with the default prefix (default = "stashed-"). Use the --prefix or -p argument to redefine the prefix

--prefix or -p

Change the default "stashed-" prefix for branch names to something else

Licence

MIT

1.1.0

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago