Skip to content

Instantly share code, notes, and snippets.

@MarioBinder
Last active July 19, 2021 06:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarioBinder/6550a30a026d30a09890b3edd5df1a32 to your computer and use it in GitHub Desktop.
Save MarioBinder/6550a30a026d30a09890b3edd5df1a32 to your computer and use it in GitHub Desktop.
stash current work into new branch #git #stash #branch
git stash
git stash branch <new-branch> stash@{0}
If the other branch already exists, you can just switch to it with checkout, then git stash apply
//via https://stackoverflow.com/a/30927991/119109
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment