Why git keeps showing my changes when I switch branches (modified,added, deleted files) no matter if I run git add or not?

Switching branches carries uncommitted changes with you. Either commit first, run git checkout . to undo them, or run git stash before switching. (You can get your changes back with git stash apply)

Leave a Comment