Main GitHub account
Go to GitHub → sign in → Create a new public repository with license and README.md file
Go to “Settings” → click “manage access” from the left panel → invite the collaborator with username or email
Now go to collaborator GitHub Email → accept the invitation
Go to “branches” from the left panel → give * in “Branch name pattern” → give tick on “Require to pull request reviews before merging” →click the “Create” button
Go to local terminal → create a branch → put some folders and files → add the folders and files, commit them → push into GitHub
Go to GitHub → refresh the page → click on “Compare and pull request”
Fill up the form → create a title that makes sense
Add some text in the pull request body
Set Reviewer (the person who reviews the code)
Set Assignees (the person who will view it after the code has been reviewed)
Reviewer GitHub account
Sign in to the reviewer GitHub account → click the “Pull requests” on the top menu → click the “Review requests” button → click the Pull request title →
Click “File changed” → work with “File filter …” and “Jump to …” if you need → click “viewed”
Click the “Review changes” button → then write some text →
select any of the fields like “Comment” or “Approve” or “Request changes” → then click the “Submit Review” button
Merge a Pull Request
After clicking the “Submit Review” button, now click on the “Merge pull request” button → add some text and then click on the “Confirm merge” button → After that delete the branch if you do not need the branch anymore by clicking the button “Delete branch”
Steps of creating a Pull Request
1. Create a new branch.
2. Commit Code
3. Push to a remote repository
4. Open a Pull request
5. Review from reviewer GitHub account.
- Provide title
- Description
- Fill in reviewers, assignees, labels, etc.
6. Command-line :
- git checkout main
- git pull
Post a Comment