Git · Middle · Question 38 of 75
How do you create a branch from a stash?
- 1
git branch --stash new-branch - ✓Correct answer:
git stash branch new-branch - 3
git switch -c new-branch stash
Explanation
It checks out the commit the stash was made on, creates the branch and applies the stash there, avoiding conflicts when the original branch has moved on.