← Go back

Github pull request workflow

Contributing to open-source projects is a good way to learn the nuances of software development. Reading, understanding and making meaningful changes to code that other people wrote is an important skill to master. In addition to that, it is a good way to give back to the software development community.

However, it may be scary and confusing for new developers to start contributing to open-source projects. First Timers Only is a great place to get started with open source contribution. This article is a short, step-by-step guide to submitting a pull request to any git repository that allows it.

Pre-Requisites

  1. Basic working knowledge of git, Github. This is a good tutorial for the same.
  2. An IDE. VSCode is highly recommended.

Pull Request Workflow

  1. Open a GitHub repository of your choice.
  2. Fork the repository by pressing the Fork icon at the top right corner. This creates a copy of the repository in your list of GitHub repositories.
  3. Go to the forked repository in your GitHub and clone the repository to your local machine and open the cloned folder using VSCode or some other IDE.
  4. Create a new branch and cd into that branch for your edits using git checkout -b your-new-branch-name
  5. Make the changes that you intend to make.
  6. Once done with changes, stage and commit these changes using git add . and git commit -m "your-commit-message" commands.
  7. Push the changes to GitHub using git push origin your-new-branch-name command.
  8. Open the forked repository (the one in your GitHub repo list) and you should see, near the top, a panel indicating recent changes made by you and the option to Compare and pull request. Press that button and the final window to open a pull request will appear. Describe your changes well and submit the pull request.
  9. That’s all, you have submitted a pull request which will now be reviewed and merged by maintainers of the repository.
← Go back