Day 3: Draft Pull Requests – Work in Progress FTW
Created by: Deep Ghinaiya
Software Developer
linkedin.com/in/deep-ghinaiya
What Is It?
A Draft Pull Request (Draft PR) lets you share your in-progress code with teammates or
reviewers before it’s ready to merge.
It’s like saying:
“Hey, I’m still working on this — but feel free to review, suggest, or collaborate.”
Why It’s Useful
• Share your progress early without merge pressure
• Get feedback and reviews as you build
• Improve team collaboration and communication
• Helps avoid unfinished code being accidentally merged
How to Create a Draft PR (Step-by-Step)
Option 1: On GitHub Web
1. Push your branch to GitHub
2. Click “Compare & pull request”
3. Select “Create draft pull request” before clicking submit
Option 2: Using GitHub CLI (gh)
gh pr create --title "Feature: login form" --base main --draft
--draft flag ensures it's a Draft PR, not a ready-to-merge one.
Example Scenario
Let’s say you're building a new feature but still working on validation and styling.
You want feedback on structure and logic — without asking to merge it yet.
You create a Draft PR, ask your teammate for a review, and finish the rest while they check
the core logic.
No pressure. Full visibility.
How to Convert Draft PR → Ready PR
Once your code is ready for review/merge:
1. Open the Draft PR
2. Click “Ready for review”
3. It becomes a regular pull request
Pro Tips
• Use Draft PRs to open communication early
• Tag reviewers in your initial message
• You can still commit and push updates as normal
• Perfect for agile teams or open-source contributors
Resources to Explore
• GitHub Docs: About Pull Requests
• GitHub CLI: https://cli.github.com/manual/gh_pr_create
Final Thought
"Draft PRs are your collaborative coding safety net — build freely, review early, merge smart."