Good, I have a problem trying to change the branch because when I made the change instead of giving me the message
Please, commit your changes or stash them before you can switch branches.
let me change the branch and also brings me the changes of that branch the flow I'm doing is the following:
1 - git checkout -b new_branch
2- I modify some file in the new_branch
3- git checkout origin_branch
I leave a more explanatory image, thank you in advance for the help you can give me.
My question is why the changes made in different branches are transferred between the branches when checking out? The behavior I need is what happens for example if I try to checkout from the develop branch to the master branch: