Fork GitHub projects
If you want to contribute to a project that is hosted on GitHub and that you cannot push to directly, follow this workflow:
Create a fork of the project you want to contribute to.
Clone this fork to create a local repository.
Make changes to your copy of the original project, commit and push them.
When you are ready to share the results of your work, run Sync Fork to rebase your fork on the current HEAD of the main branch in the original project. This is needed to make sure your changes do not conflict with new commits that were pushed after you created your fork.
Create a pull request to suggest your changes to the original project.
Display and apply suggestions locally.
Fork a project
A fork is your copy of a GitHub repository that allows you to make changes to code without affecting the original project.
Create a fork
Open the project that you want to fork on GitHub and click
.
A copy of the original project will be created under your account. To make changes to this project, you need to clone it to create a local repository.
Sync fork with the original project
In the main menu, go to . Your fork will be rebased onto the HEAD commit in the
mainbranch of the original project you created your fork from.
- If Sync Fork does not complete
If the sync does not complete, check the remotes of your local repository and note that:
Multi-repository projects are not supported.
JetBrains Rider treats the
originremote as the one that points to your fork. If there is no such remote, or if it does not point to a GitHub fork, JetBrains Rider shows the corresponding message.To read the URL and the default branch of the original project, JetBrains Rider uses a GitHub account registered for the
originserver. If there are several such accounts, it asks you to choose one.JetBrains Rider adds a remote called
upstreamfor the original project, or reuses an existing remote that already points to it, fetches it, and rebases the current branch onto the default branch. If the repository already has anupstreamremote with a different URL, JetBrains Rider shows an error message.The
upstreamURL uses HTTPS, or SSH if Clone git repositories using ssh is enabled in .
Watch this video tutorial on how to keep your fork of a project up to date: