SHARE:
Uncategorized

Understanding Git Pull Requests for Beginners

Flatiron School / 19 October 2012

The following is a guest post by Ericka Ward and originally appeared on her blog. Ericka is currently a student a The Flatiron School. You can learn more about her here, or follow her on twitter here.

Thomas Dippel, a Ruby on Rails Developer, posted a simple and helpful slideshow on pull requests on Speakerdeck. His presentation explains the benefits of pull requests and he offers tips on using the pull requests effectively. Prior to looking at the presentation, I’ve submitted several pull requests and have even accepted a couple but his presentation really helped me understand why they are so useful.

He points out that the benefits of pull requests include: Collaboration Insight Safety History

For tips on how to best use pull requests, he suggests: Be Descriptive Cleaning up branchesStart Small, Let them Grow Be Constructive Let People Chime In Have fun!

Thus far, I’ve only used pull requests as a means to notify collaborators of updates that I want to make to some code. I would make my pull request and it would be accepted, usually because our projects thus far have been relatively simple. Dippel’s presentation showed me that pull requests are a really great place for collaborators to review code and suggest changes.

The first suggestion of “being descriptive” may be obvious to many people, but for a complete beginner like me, it actually made me think about the notes I was including in my pull requests. I realized that I wasn’t being descriptive at all. I would write a couple of words or maybe a sentence that offered very little information. I have a lot to learn about commenting on code but I would guess that it’s helpful to be clear and concise but you still need to be descriptive just so that your collaborators really understand what they’re analyzing.

I’m very excited to be able to further my understanding of the usefulness of pull requests for the github collaboration process. There are a lot of great tools on github so I am so excited to keep learning more!

Obviously, the great people at Github also have great resources for learning about pull requests. Here are two that really helped me: https://help.github.com/articles/using-pull-requests https://github.com/features/projects/codereview

Classroom vs. Bedroom vs. Lecture Hall (Part 1 of 3) Previous Post SQL Joins Explained Visually: The 3 Ring Binder Model Next Post