Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save shalaby/b3b24d1be19c67f458561bf58822857f to your computer and use it in GitHub Desktop.
Save shalaby/b3b24d1be19c67f458561bf58822857f to your computer and use it in GitHub Desktop.
Git: stash work in progress and move it to a new branch
  • make changes
  • git stash save
  • git checkout -b xxx
  • git stash pop

where xxx is the new branch name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment