> remote: Compressing objects: 100% (8/8), done. $ git clone > Cloning into `Spoon-Knife`. It will look like this, with your GitHub username instead of YOUR-USERNAME: git clone Type git clone, and then paste the URL you copied earlier. Ĭhange the current working directory to the location where you want the cloned directory. To clone a repository using GitHub CLI, click GitHub CLI, then click. To clone the repository using an SSH key, including a certificate issued by your organization's SSH certificate authority, click SSH, then click. To clone the repository using HTTPS, under "HTTPS", click. On GitHub, navigate to your fork of the Spoon-Knife repository. If you do not select this option, all branches will be copied into the new fork. Optionally, select Copy the DEFAULT branch only.įor many forking scenarios, such as contributing to open-source projects, you only need to copy the default branch. Optionally, in the "Description" field, type a description of your fork. Optionally, to further distinguish your fork, in the "Repository name" field, type a name.
Under "Owner," select the dropdown menu and click an owner for the forked repository.īy default, forks are named the same as their upstream repositories.
In the top-right corner of the page, click Fork. This tutorial uses the Spoon-Knife project, a test repository that's hosted on that lets you test the fork and pull request workflow. For more information, see " Fork a repository." Forking a repository You can contribute by submitting pull requests from your fork to the upstream repository. Forks are often used to iterate on ideas or changes before they are proposed back to the upstream repository, such as in open source projects or when a user does not have write access to the upstream repository. If you want to contribute to someone else's project but don't have write access to the repository, you can use a "fork and pull request" workflow.Ī fork is a new repository that shares code and visibility settings with the original “upstream” repository.