crazyfactory/gitflow

Label stashed changes

Closed this issue ยท 1 comments

if there is WIP that is not yet committed but needs to saved, we stash it:

async function stash() {
  await exec('git stash');
}

this stash will not label the changes for easy lookup &/or retrieval later.
we can ask stash label instead of confirmStash (y/n).

promptStash: () => {
  const question = {
    message: 'You have some local changes. Enter label to stash it (Empty input will discard changes)',
    name: 'stashLabel',
    type: 'input'
  };
  return inquirer.prompt(question)
}

then stash will be like

async function stash() {
  await exec('git stash push -m "label goes here"'); // label comes from promptStash()
}

important: sanitize stash label

๐ŸŽ‰ This issue has been resolved in version 1.6.0 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€