"I am a Trekkie because Star Trek isn't woke"
Star Trek:
— Comfortably Numb (@ygalanter.bsky.social) Jan 4, 2024 at 6:40 PM
Monthly Archives: April 2024
Force add file permission in git.
I was working on a Windows laptop with a repo originally created on Mac, and git arbitrary changed bash script file permission from 755
to 644
.
I was able to change it back by updating git index
git update-index --chmod=+x script.sh
But I couldn’t commit this change, because as far as git was concerned nothing in the file changed. But I was able to force-add the change
git add --chmod=+x -- script.sh
After that I was able to commit and push the change.