Have you ever been in a situation where you needed to fork a repo on GitHub, but you 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 mobile
To fork a repo on GitHub using your mobile device, follow the steps below.
1. 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. 😉)
2. 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.
Choose where you want to fork the repo. In this case, I’ll be forking it to my account. So, I’ll click on my account name.
3. 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 this article helped you, it might help someone else too. Click the share
button below to spread the word!
Got thoughts or questions? Lets connect on
X or
LinkedIn.
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.
- Learn how to Improve the UX of your data tables using CSS.
Frequently Asked Questions
1. What is a GitHub repo?
A GitHub repo is a repository that contains files and folders. It can store code, documents, images, and more. Repos are used to organize a single project or multiple projects, and they can be made public or private.
2. What is a fork in GitHub?
A fork is a copy of a repo that allows you to freely experiment with changes without affecting the original project. Forks are used to propose changes to someone else’s project or use someone else’s project as a starting point for your idea. You can stay updated with the original repo by pulling changes from the original repo into your fork.
3. Can I fork a repo on my mobile device?
Yes. You can do this by clicking the fork button on the repo page. You can also fork a repo by editing 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.
4. Can I fork my own repo?
You can’t fork your own repo on the same account it is on. But you can fork it to another account you own or an organization you’re a member of.
5. Can I fork a private repo?
You can only fork a private repo if the owner grants you access to it and permits forking on that repo. Do note that when the access gets revoked, you’ll also lose access to the forked repo.
6. Can I fork a repo twice?
No, you can’t. You can only fork a repo once.
7. Can I fork a repo and make it private?
No, you can’t. For security reasons, GitHub doesn’t allow you to make a forked repo private. But you can duplicate the repo and make it private.
