Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/meszaros-lajos-gyorgy/stash-to-branch
A cli tool for git, which allows stashing and restoring changes to a branch
https://github.com/meszaros-lajos-gyorgy/stash-to-branch
Last synced: 11 days ago
JSON representation
A cli tool for git, which allows stashing and restoring changes to a branch
- Host: GitHub
- URL: https://github.com/meszaros-lajos-gyorgy/stash-to-branch
- Owner: meszaros-lajos-gyorgy
- License: mit
- Created: 2017-05-25T20:20:52.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-08-04T14:01:15.000Z (over 7 years ago)
- Last Synced: 2024-12-25T07:26:41.256Z (25 days ago)
- Language: JavaScript
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# stash-to-branch
A cli tool for git, which allows stashing and restoring changes to a branch
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VPW29QJ4HBZ74)
[![Build Status](https://travis-ci.org/meszaros-lajos-gyorgy/stash-to-branch.svg?branch=master)](https://travis-ci.org/meszaros-lajos-gyorgy/stash-to-branch)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)## 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 madePush 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 codeFeel 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