So, you'd like to fork a repository!
First, let's quickly discuss what forking is:
Forking is the process by which you can clone a repository, including the visibility settings and all the code, but detatch it from the original ownders so that you can make changes, and push those changes as you want!
So let's go through the steps we need to take to fork a repository!
- Navigate to the top right of the repository, and click on the "Fork" button:
- From here you should see a window that displays a lot of default information. You can leave these options the same, or you can modify them to your hearts content!
- You should now see a window letting you know your fork is in progress:
- That's it! You've forked the repository! You now have all the code, and the commit history of that fork.
Let's say the original repository owners make some changes to their repository, and you'd like those changes to be present in your fork. You might think you have to "re-fork" the repository, but GitHub allows you to "Sync fork" instead! Let's check out how to do that:
- First of all, head to your fork on GitHub.com. We're looking for this banner:
- Notice how we see that this branch is "1 commit behind", we can click on the "Sync fork" button, and then the big green "Update branch" button to sync our fork with the original repository!
- That's it, you're done! 🥳
And there you have it, that's all it takes!