After git switches branches, the file modified by the previous branch does not have permission in the new branch?

modify the file in another branch, and then switch to another branch. The modified file in the new branch is put into the cache, and cannot do anything. No matter what you do, you are prompted to submit the change, but the submission prompt has no permission
after switching the branch, the file modified in the previous branch is put into the cache file
clipboard.png
Permission denied
clipboard.png

clipboard.png

.
Mar.08,2021

I also encountered the same problem,

Menu