We should start off with proof that this works. Here's a screenshot of the recent viewer analytics for my GitHub repo, which has just started to take off:
It's clear from this chart that I spent a little while trying to get stars in ways that flat-out don't work before I found the ways that do. I'm here to help you cut through the crap and focus on the methods that work.
Your READ-ME file is like your repo’s homepage. A good percentage of people will star your project just because it looks good, and not all users will scroll down past the top of your READ-ME, so make the top part as pretty as possible. Here’s how to create a READ-ME, and here’s a place to practice your markdown if needed. A recipe for success is a well-designed logo with a tagline underneath followed by shields and then a colorful splash image. Here's what I did with my repo; it's animated, so you can click here if you care to see it live:
People have incredibly short attention spans. Cut all the excess wording out of your READ-ME and get down to brass tacks. If possible, show the user how to use your project in a quick gif. Here’s how to record your screen on a Mac and PC. Here’s the best online video to gif converter I’ve found.
People don’t like when you’re selling them something. If possible, create a license for your repo that opens it up for free use. I chose the “Unlicense License”. This will be featured next to your READ-ME, and people will see it.
It’s weird, but people are more willing to star your project if they see that others have already done so. Ask your friends to star your project to get the ball rolling. Do not create fake GitHub accounts to star your own project. GitHub will catch you after about 4 accounts, guaranteed.
When people share a link to your GitHub repo, it’ll be accompanied by whatever image you choose for your social card. Make it colorful enough to pop off the screen and provocative enough to be worth a click. Here’s how to upload one.
Once you advertise on these communities, connect with people on them. They won’t find you unless you give them a reason to care that you exist. Find articles on Dev.to you like and actually like them/leave comments. Star projects on GitHub and contribute to other projects. Like and retweet people on Twitter.
People will respond to your posts on these communities with advice. Tell them that you’ve heard them and actually change your project to fit what the public wants. They’re explicitly telling you how to make the project worth starring, so listen.
Users are more likely to star/fork your repo if there's something in it for them. You can reward them by automatically displaying their username and avatar in your README with Repo Roster. Just paste a link to your repo into the website, and copy the resulting markdown into your README.