Skip to content

Instantly share code, notes, and snippets.

@darrentorpey
Last active March 13, 2017 13:24
Show Gist options
  • Save darrentorpey/6aadcf69c2bc5e662d57d44431a9b11e to your computer and use it in GitHub Desktop.
Save darrentorpey/6aadcf69c2bc5e662d57d44431a9b11e to your computer and use it in GitHub Desktop.
Git scenarios: problems and solutions

Scenario: changes on wrong branch

Oops, I started making changes on the wrong branch and git checkout CORRECT_BRANCH says I cannot simply switch over

Solution

git stash
git checkout CORRECT_BRANCH
git stash pop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment