I have two branches in my local git repository: master and anotherbranch. When I switch from master to anotherbranch with git checkout anotherbranch and run git status I see modified files.
I undo these modifications with git reset HEAD and then git status does not display them. However when I switch to master and switch to the branch afterwards I see these modified files again.
Could you please explain what is going on?