Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing File Mode permissions from 100755 to 100644 on GITHUB

I changed permissions of some files locally and pushed it to GITHUB without having the config.FileMode flag = false in my gitconfig. So GIT Pushed the file mode changes but I want to revert those file mode changes from 100755 to 100644.I am using a MAC osx as my development environment. I don't want to use git reset --hard HEAD on my repository. Any suggestions ?

like image 691
psbits Avatar asked Jan 08 '23 23:01

psbits


2 Answers

In my case just changing the permission manually from 755 to 644 worked and pushing it again to GITHUB.

chmod 644 <filename> 

GIT will list this file in the diff and you can simply commit and push it to your repository on GITHUB.

like image 83
psbits Avatar answered Jan 17 '23 16:01

psbits


I changed permission of my files manually from 755 to 644 using the below mentioned command and pushed the files again.

chmod -x <file_name>

After pushing the files, I changed core.filemode config to false so that permission of other files don't get changed.

like image 30
Shilpi Avatar answered Jan 17 '23 16:01

Shilpi