Have you ever been in a situation where you needed to fork a repo on GitHub but didn't have access to a computer? Well, I have, and it was a pain in the butt. (Ps. You can skip the back story and go straight to the tutorial. Head over to How to fork a repo on mobile.
Earlier in my learning journey, I did most of my learning on my mobile device. I didn't have access to a computer at the time, so I had to make do with what I had.
I was able to do most of the things I needed to do on my mobile device, but forking a repo was not one of them. I had to wait until I could access a computer before I could fork a repo. This was a huge inconvenience for me, and I'm sure it is for many others as well.
Later, I found a workaround that allowed me to fork a repo on my mobile device. It wasn't the most convenient way, but it worked. I had to switch my browser to desktop mode, and then I could fork the repo. But desktop mode doesn't really work on iPhones. If you're using an iPhone, you might be out of luck.
This was a vast improvement over waiting until I could access a computer, but it could have been better. You can read more about this method in my previous article on how to fork a repo on your mobile device.
Another method I discovered later was trying to edit a file in the repo. When you try to edit a file in a GitHub repo you don't have access to, GitHub will prompt you to fork the repo. This was a much better solution than the previous one. It was a lot easier to do and didn't require me to switch my browser to desktop mode.
With the recent update to GitHub's web interface, you can now fork a repo with the click of a button. This is a massive improvement over the previous methods.
On a side note, I am loving this new interface update. It's so much easier to use than the previous one. Anyhow, let's get started.
How to fork a repo on a mobile phone
To fork a repo on GitHub using your mobile device, follow the steps below.
Find a repo to fork: Obviously! You need to find a repo to fork. You can fork any repo you want, but for this tutorial, I'll be using my Tech Roadmap repo. You can fork it if you want, but you don't have to. (You should totally fork it, though. It's a cool repo. ๐)
Click the fork button: Once you've found a repo to fork, click the fork button. It's located at the top left corner of the repo page. It's the button with the fork icon on it. It's not hard to miss. Once you click the button, GitHub will prompt you to choose where to fork the repo. You can fork it to your account or an organization you're a member of. For this tutorial, I'll be forking the repo to my account.
- Click the create fork button: Once you've chosen where to fork the repo, click the Create Fork button. This will fork the repo to your account. Once the repo has been forked, you'll be redirected to the forked repo page. You can now start working on the repo.
Conclusion
And that is it. That is how you fork a repo on GitHub using your mobile device. It's super easy to do and doesn't require you to switch your browser to desktop mode. Plus, it works on both Android and iPhone.
If you found this article helpful, please share it with others. It will help others find it and encourage me to create more content like this. If you have any questions or comments, please feel free to tweet me at @Timonwa_. I'd love to hear from you.
Till next time, happy coding! ๐
Explore More
Discover more insights and tutorials on my blog:
Learn how to Create a Loading Spinner in CSS with Overlay.
Dive into JavaScript Projects for Beginners and enhance your coding skills with practical projects.
Getting started with Open Source Contributions and how they can boost your tech career.
Connect With Me
Stay connected with me on X(formerly Twitter) and LinkedIn for the latest updates. You can support my work through BuyMeACoffee or GitHub Sponsor. For additional support options, check out my Sponsorship and Affiliate Links pages. Your support helps me create more valuable content!