Skip to content

Instantly share code, notes, and snippets.

@NitkarshChourasia
Created August 9, 2023 12:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NitkarshChourasia/de6856932b8af5a3dbc27038b650592c to your computer and use it in GitHub Desktop.
Save NitkarshChourasia/de6856932b8af5a3dbc27038b650592c to your computer and use it in GitHub Desktop.
Owner_PRs_CODEREVIEW

To allow others to review your code on GitHub when you are the owner and primary contributor, you can follow these steps:

  1. Create a Branch: Before you start working on a new feature or making changes, create a new branch in your repository. This branch will contain the changes you want others to review.

  2. Make Changes: Add, modify, or delete code as needed to implement the feature or fix an issue.

  3. Commit Changes: Commit your changes to the branch. Use clear and descriptive commit messages to explain the purpose of each change.

  4. Push to Remote: Push your branch and commits to the remote repository on GitHub. This is usually done using the git push command.

  5. Create a Pull Request (PR): On the GitHub repository page, navigate to the "Pull Requests" tab and click the "New Pull Request" button. Select the branch you pushed and the branch you want to merge the changes into (often the main or master branch).

  6. Reviewers: In the pull request form, you'll find a section to add reviewers. You can choose specific individuals or teams to review your code. GitHub will notify them about the pull request.

  7. Review and Discussion: Reviewers will review the changes you've made. They can comment directly on the code, suggest improvements, and ask questions. You can engage in discussions with them to address their feedback.

  8. Make Changes: Based on the feedback received, you might need to make additional changes to your code. Commit these changes to the same branch.

  9. Respond to Comments: As you make changes, address the comments left by the reviewers. You can reply to their comments, explaining your decisions or modifications.

  10. Approval and Merge: Once the reviewers are satisfied with the changes and approve the pull request, you can merge the changes into the main branch. Click the "Merge Pull Request" button on GitHub.

  11. Delete Branch: After the changes are merged, you can delete the branch if it's no longer needed.

By following these steps, you can collaborate effectively with others on GitHub, even if you're the owner and primary contributor. Reviewers' insights and feedback can lead to better code quality and improved collaboration within your repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment