VOOZH about

URL: https://thenewstack.io/code-n00b-polite-guide-pull-requests/

⇱ Code n00b: A Polite Guide to Pull Requests - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2017-12-01 12:00:35
Code n00b: A Polite Guide to Pull Requests
analysis,code-n00b,
Open Source / Software Development / Tech Culture

Code n00b: A Polite Guide to Pull Requests

Dec 1st, 2017 12:00pm by Michelle Gienow
👁 Featued image for: Code n00b: A Polite Guide to Pull Requests

Fun fact: Did you know you can easily see the very first pull request of any GitHub user? And I do mean any user.

That fun little page popped up as I am gearing up for the Dec. 1 kickoff of 24 Pull Requests. Yes, it’s that most wonderful time of the year again! Doing this got me to thinking about my first PR. And, honestly, the fact that there aren’t many subsequent PRs in my personal GitHistory. Last year, when I first heard about the 24PR initiative, it was like a week before Xmas. Not only was I late to the party, but as a n00b I wasn’t even sure how to go about identifying an open source project to contribute to. Much less go about opening a pull request that wasn’t, like, totally wrong and, subsequently, totally embarrassing.

So now it’s somehow magically a year later, and time to get real about actually doing this thing. Thankfully, I’m much less worried about embarrassing myself this time around, I’ve done it so much these past 12 months that I sort of don’t even notice anymore, so I’m just going to dive on in. That said, it occurred to me to maybe do a bit of pre-24PR prep so that maybe I waste project maintainer’s time just a little bit less with my newbie attempts at being helpful. Here are some of the things more experienced GitNinjas tell me to keep in mind before throwing a PR at perfect stranger — basically, Pull Request Etiquette.

Ask First

Sometimes the first step to opening a pull request is not to open a pull request.

Yes, it’s pretty obvious, but if you’re an excited first-timer sometimes you’re in a bit of a hurry and might not think to ask. So, if you’re approaching some cute project that has caught your roving eye, it’s best to start by opening an issue. Creating an issue is not just for reporting a bug you’ve spotted in someone’s code — it’s also a means to approach project maintainers with suggestions, requests, whatever you got.

For the love of Linus, test and debug. The best way to make a PR is to submit clean, organized, readable code free of mistakes and glitches.

And it’s good for all involved here. What if the creators have a good reason they don’t want to add that super cool idea for a project feature you are really excited to tell them about? Or, what if they already had the same super cool idea and it is already in progress? Before you start writing code for someone else’s project, it’s a good idea to first open an issue and, you know, ask about it.

Branch Out

K, so you found a bug or a typo or have an idea for an additional feature; you opened an issue, communicated with the author, and they said: “Yes, please.” W00t! It’s code o’clock! Well, almost.

First, create a branch for that shiny new code. Branches are best for working on any project feature or fix, and PRs are no exception. It goes without saying to name the branch

This is always a good idea when working on a specific feature or fix for any project, and PRs are no exception. Of course, you’re going to name your branch something concise, readable and directly corresponding to the change you are suggesting.

Style Right

Ok, another thing that is good to do before you go and write your beautiful code: check out the target project’s particular style. Every project has one, and it’s bad form to go changing things just because you think they way they’ve been doing it is wrong or dumb or violates some pet peeve of yours.

For example: check out the variable names. If the author uses camel case, so should you. Ditto the commit messages: strive to match the language and style the authors chose for their commits. Look for other important structural aspects, too — like If the project has a test suite, you should be writing tests for any code you’re contributing. Remember, we are supposed to be helping, not making extra work for the maintainers.

Work Your Magic

(This is the part where you actually write code, wheee!).

Now clean it up.

Take a thorough look at what you’ve made. For the love of Linus, test and debug. The best way to make a PR is to submit clean, organized, readable code free of mistakes and glitches.

However, mistakes can be missed — and authors can certainly, and legitimately, ask for changes before finally merging your PR. So rebasing is very important at this phase. Even if you catch your mistake and fix it in a subsequent commit, the project maintainers are likely to read the commits chronologically, see the mistake/bug/problem first, and only later find out you already fixed it — like, after they spent 15 minutes diagnosing and writing their request.

Plus, authors ultimately want one solid, clean commit — not half a dozen reworkings and fixings leading up to the final flawless code contribution. So: rebase to condense and clean up any previous commits, and merge branches based on the latest commit. (Because you’re keeping your branch current with master, right?)

And Submit!

Trusting you’ve already got that part down.

Fa la la la, only (25 – Date.now() ) days left in this year’s 24PR party!

TRENDING STORIES
Michelle Gienow is a former journalist turned software developer. She draws from both professions to write about in-depth technical topics ranging from K8s to Kotlin. Michelle is co-author of "Cloud Native Transformation: Practical Patterns for Innovation" from O'Reilly Media and...
Read more from Michelle Gienow
SHARE THIS STORY
TRENDING STORIES
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.