Suppose I have a local Git repo and some uncommitted changes. Because the changes might be very messy, I don't want to commit to my branch yet, but I do want to test it on the cloud.
I'm seeking a sequence of git commands that can:
- Commit the "messy changes" to another branch, such as
mymessydev
git push origin mymessydev
.- Switch back to master branch with the same uncommitted changes, as if nothing has ever happened.