Steps
- Pull latest
- git checkout main
- git pull origin main
- Create feature branch
- git checkout -b feature/login
- Code + commit
- git add .
- git commit -m "feat: implement login API"
- Push
- git push origin feature/login
- Create Pull Request (on GitHub)
- Compare feature/login → main
- Add description
- Request review
- Code Review (by Teammates)
- Comment
- Request changes
- Update PR
- git add .
- git commit -m "fix: address review comments"
- git push
- PR will auto update (no need to create a new PR)
- GitHub auto adds those commits to the PR
- Reviewers will see:
- New commits
- Updated code changes (diff)
- Reviewer approves your PR.
- Anyone with merge permission can merge the PR:
- Merge commit
- Squash merge (very common)
- Combines all commits from a feature branch into a single new commit on the target branch. (clean)
- Rebase merge