Well, I had a question and when I asked the question here on the same topic that I'm opening I answered myself but I decided to continue to help someone who might have the same doubt.
My question was how to make changes to a branch and make the modified files stay in it without following me if I change the branch during development, well it's simple just give git commit
so the changes will stay in the branch where they are at the time of git commit
and therefore when changing branch they will not go to the new branch as it happens if you do not commit before changing your branch.
Well this was the solution I found I do not know if it is the best solution for this, but if you know other options please share.
Help your next , when giving git commit
do not forget to put a comment git commit -m "[COMENTÁRIO]"
this will facilitate a future interpretation for you and your colleagues.