In this article, we will covered how to solve changing git file permission issue.
Are you getting issue of changing file permission on doing git pull on server/remote machine?
This is because of the issue with writable group permission.
1. In case you want your GIT not to track the file permission changes, run the following command:
git config core.fileMode false
git init
Make sure it’s fileMode (case sensitive).
Alternatively, you can open your config file also :
cd goto/rootdirectory
cd .git
vi config
You will get something like this :
[core]repositoryformatversion = 0
filemode = false
bare = false
Change your filemode to false if it’s true and save file.
2) In case still the issue persist, then it can be your ‘umask’ at fault.
Type command :
umask
If it returns 0002 , changing it to 0022 by tying command :
umask 0022
To changing the default umask (as it will get reset on every login to your server) , use following command:
# vi ~/.bashrc
Append/modify following line to setup a new umask:
umask 022
Save file and you should be good to go.
In this article, we have seen how our support engineers solve changing git file permission issue.
[Need assistance to fix this error or install tools? We’ll help you.]