Using SourceTree in Win 10, fixed the problem by closing Atom editor.
Error reproduce:
- In branch B, create a md file, using Atom edit it, save and commit.
- Switch to branch A, pull down new commits from server.
- Try Switch back, Opps, it says “error: cannot stat 'file': Permission denied”.