Assuming you’ve already forked the original repository and made the necessary changes to the source code, then you are ready for the last step and arguably the most important one: offering those changes to the main project. This is done by creating a pull request.
Pull requests let you tell others about changes you’ve pushed back to the original repository. When a pull request is sent, others can review the set of changes, discuss potential modifications, and even push follow-up commits if necessary.
Steps to create a pull request in GitHub:
- Surf to your forked repository and select the ‘pull requests’ tab
- Press the button ‘New pull request’
3. Select which branch/code changes you want to offer to the main project. Make sure you select the correct target and source repositories.
4. Press ‘Create pull request’ and provide as much information as you can, and don’t forget to add why you create the pull request in the first place.
5. Don't forget to reference the issues that your pull request will solve! This will like your solution with the reported problem. This is done by extending the you comment with: fixes #123 (where #123 is the issue number that you want to reference).
6. Last step: press ‘Create pull request’ once more.
Et voilà, your changes have just been sent to the main project for review.
Note: GitLab refers to Pull requests as Merge requests. Besides that, the principles of offering code changes via requests remain the same.