Last Updated: September 09, 2019
·
321
· pocha

git moves uncommitted changes across the branch which is bad

Recently I started creating temporary branches in my git repo to be able to move my temporary changes & not to corrupt my main branch.

I realized that unless I do not commit the temporary changes in the new branch, those changes come back to the main branch once I switch back to the main branch. This was not obvious to me. Sharing the pro-tip in case you are someone like me :).