DataGrip 2024.3 Help

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:

  1. Create a fork of the project you want to contribute to.

  2. Clone this fork to create a local repository.

  3. Make changes to your copy of the original project, commit and push them.

  4. 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.

  5. Create a pull request to suggest your changes to the original project.

  6. 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 fork icon

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.

Rebase a fork

  • In the main menu, go to Git | GitHub | Sync Fork. Your fork will be rebased onto the HEAD commit in the master branch of the original project you created your fork from.

Watch this video tutorial on how to keep your fork of a project up to date:

Last modified: 26 May 2024