About forking
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.
A fork is a new repository that shares code and visibility settings with the original “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.
You can contribute by submitting pull requests from your fork to the upstream repository. For more information, see "Fork a repo."
Forking a repository
This tutorial uses the Spoon-Knife project, a test repository that's hosted on GitHub.com that lets you test the fork and pull request workflow.
-
Navigate to the
Spoon-Knifeproject at https://github.com/octocat/Spoon-Knife. -
In the top-right corner of the page, click Fork.

Cloning a fork
You've successfully forked the Spoon-Knife repository, but so far, it only exists on GitHub Enterprise Server. To be able to work on the project, you will need to clone it to your computer.
You can clone your fork with the command line, GitHub CLI, or GitHub Desktop.
-
On GitHub Enterprise Server, navigate to your fork of the Spoon-Knife repository.
-
Above the list of files, click Code.

-
Copy the URL for the repository.
-
To clone the repository using HTTPS, under "HTTPS", 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 a repository using GitHub CLI, click GitHub CLI, then click .
-