I created a Git repository on a folder that had a different Linux owner than my user. It wasn't until much later that I set the group permissions to write so that my user could make changes and commits to Git. However, whenever I switch from a branch to master, all the group write permissions are lost.
I've tried switching to the master branch, and using the root user to make all files write-enabled for the group I'm in. But when I switch to a different branch, all the group write permissions are lost again.