MÓDULO_TEÓRICO
Professional Workflow: Pull Requests
Professional Workflow: Pull Requests (PR)
In a professional environment, you NEVER git push directly to the main branch. main is protected.
How do you upload code then? Via Pull Requests (PR).
The PR Lifecycle:
- Clone repo.
- Create a branch:
git switch -c feature/new-button. - Commit and push YOUR BRANCH to the cloud:
git push origin feature/new-button. - Go to GitHub and click "Compare & Pull Request".
- Code Review: Teammates review your code, leave comments.
- Once approved, someone clicks Merge to integrate it into
main.
