I'm pretty new to using Git so I may just not understand this properly, however I can't seem to find an answer.
When working on a branch off master when I make changes on the new branch then switch back to master using:
$git checkout master
My changes are being carried over to the master branch without me committing and merging or even staging the changes.
I thought it was not supposed to be possible to switch branches without committing or stashing the changes.