Skip to content

Instantly share code, notes, and snippets.

@liitfr
Last active December 16, 2024 17:58
Show Gist options
  • Save liitfr/86c77bf0ea4a627ab9b62ad30c32c251 to your computer and use it in GitHub Desktop.
Save liitfr/86c77bf0ea4a627ab9b62ad30c32c251 to your computer and use it in GitHub Desktop.
[how to revert 100644 → 100755 commits ?] #git #chmod

how to revert 100644 → 100755 commits

  • on your repo's root, run : find . -type f | xargs chmod -x
  • commit this change on files : commit -n -m 'fix: files permission from 100755 to 100644'
  • then with vim .git/config, set filemode option to false
[core]
        filemode = false
@mihazs
Copy link

mihazs commented Apr 28, 2021

Thanks for the gist, you saved me a lot of time.

@stitch
Copy link

stitch commented Nov 22, 2021

Thanks! Saved a ton of time!

@danielcettour
Copy link

thanks for this, if you are on ubuntu, xargs command would be like this:
find ~ -type f -print0 | xargs -0 chmod -x

@dkraemerwork
Copy link

This is dangerous!

@marvinpuethe
Copy link

find ~ -type f -print0 | xargs -0 chmod -x

Please change it to find . -type f -print0 | xargs -0 chmod -x because your current command is executed for each file in your home directory

@heomeco2014
Copy link

Thanks, using @marvinpuethe's approach above worked for me

@zumbiepig
Copy link

@liitfr The command should be find . -type f -print0 | xargs -0 chmod -x so that filenames containing spaces do not return a File Not Found error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment