DataGrip 2022.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:

  • 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 master 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 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

  • From the main menu, choose 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: 05 December 2022