Russell Gordon

How to Fork and Clone a Repository

04 January, 2021

    On some occasions, you may be asked to first fork, and then clone a repository that I have created.

    How to Fork a Repository

    To fork a repository, visit it on GitHub.

    The repository address will have been provided to you.

    Here I have a repository with files that help students learn to program in Swift.

    To fork a repository, press the Fork button in the top-righthand corner of the page.

    After a few seconds, you will have your own copy of the repository.

    To verify that the copy process was successful, check that your own GitHub account is listed in the top-lefthand corner.

    How to Clone a Repository

    Now, to clone the repository, just click the green Code button, then Open with Xcode.

    NOTE: If you don't see the Open with Xcode option, be sure that you have logged into GitHub, and, that you have followed these instructions to create a personal access token for Xcode.

    You may need to give your browser permission to open Xcode.

    Choose the location on your computer where you wish to save a local copy of the repository.

    After a few seconds, the repository you cloned should open in Xcode.

    You're now all set to begin coding!

    Remember to commit and push your work often. ☺️