-
Notifications
You must be signed in to change notification settings - Fork 1
Learning Pull Requests!
akcineren edited this page Sep 23, 2025
·
1 revision
- 🚀 Why Use Pull Requests?
- 🔧 How to Create a Pull Request
- 🔍 PR Review Process
- 🧪 Example Workflow
- 🏁 After Your PR is Merged
- 🧠 Extra Tip: Draft Pull Requests
- ✅ Code Review: Enables teammates to review your changes before merging.
- 📜 History: Documents why and how changes were made.
- 🔄 Collaboration: Enables discussion, suggestions, and improvements.
- 🛡️ Safety: Prevents direct edits to critical branches like
main.
-
Create a New Branch from
mainor another base:git checkout -b feature/your-feature-name
-
Make your changes in the project, then commit them:
git add . git commit -m "Add: meaningful description of the changes"
-
Push your branch to the remote:
git push origin feature/your-feature-name
-
Go to GitHub → Your Repository, and you’ll usually see a prompt:
"Compare & pull request"
Click it.
-
Fill in the Pull Request form:
- Title: Short, clear description of the feature or fix.
- Description: What did you change? Why? How does it work?
-
Base branch:
main -
Compare branch:
feature/your-feature-name
-
Click "Create Pull Request"
Once the pull request is created:
- Team members can review your changes.
- They may approve, request changes, or comment on specific lines.
- Once approved, the PR can be merged into the base branch by a team member (or you).
# Step 1: Create a new branch
git checkout -b feature/docker-setup
# Step 2: Make your changes
# Step 3: Commit changes
git add .
git commit -m "Add: Docker support for mobile development"
# Step 4: Push the branch
git push origin feature/docker-setup
# Step 5: Open GitHub and create a pull request from feature/docker-setup → mainTo keep your local main branch up to date:
git checkout main
git pull origin mainIf you're still working but want early feedback:
- Click "Create draft pull request"
- Reviewers will know it’s not ready to be merged yet, but they can comment and help you improve it.