I was working with git bash on Windows. I edited some files, committed them and pushed to a branch, and then I switched back to master to pull it and then tried to switch back to my branch to merge master into it. Git told me that I didn't have permissions to get a bunch of files and refused to checkout the branch.
The only thing I can find on changing file permissions in git on Windows are a bunch of posts about how to flip the executable bit, and telling me I could see the permissios using git ls-tree branch
and git ls-files branch
. Using the former, I see that the folder containing the files has permissions of 040000 on the branch I want to switch back to. Obviously flipping the executable bit isn't going to make this folder read-writable. How do I change those permissions back?
Edit: After looking around, I'm confused. All of the folders have the same permissions as above (040000) but I can cd into them and view the files there. The folders that are the problems are ones that were added only in the new branch. I seem to have copies of them in my checked-out repo anyway, but they can't be accessed, either through git bash, or Windows Explorer.