Tag Archives: github

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.

Easily verify yourself on Mastodon with GitHub

Mastodon unlike Twitter doesn’t have official (or paid, thanks Elon Musk) verification badge for account profile, but it does offer a way to verify yourself – by placing following link tag into HTML of a website/page you own (your blog for example):

<a rel="me" href="https://your.instance/@YourHandle">Mastodon</a>

where “your.instance” and “@YourHandle” are the Mastodon server you use and your profile handle respectfully. But what if you want to verify yourself with your GitHub profile? An ideal place would be something like a README.md file. Unfortunately every link placed into a markdown file automatically gets rel="nofollow", so it’s a no-go. But there is a way to do this. Continue reading →