Skip to content
Discussion options

You must be logged in to vote

Hey! That error means you have some changes that haven’t been saved yet, and Git doesn’t want to overwrite them.

If you just want to switch branches without losing your work, you can run:

git stash

Then switch branches:

git checkout branch-name

And when you're ready to get your changes back:

git stash pop

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by 64bits32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants