Answer the question
In order to leave comments, you need to log in
How to revert file permissions in git?
Accidentally launched
sudo git add . -> sudo git commit ..., sudo git push ..
instead of the same commands, but without sudo. Now, in the github there is +5k modified files, with different changed rights. How it is possible to roll back all changes of the rights back?
Answer the question
In order to leave comments, you need to log in
The repository does not store file permissions, nor does it store other attributes. A commit is not copying files to a new location, but parsing and saving their original state to a database.
The only attribute that git stores is the attribute of the executable file.
core.fileMode
Tells Git if the executable bit of files in the working tree is to be honored.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question