Friday, January 16, 2015

GitHub: Hand Holding Where You Need It

I'm still fairly new to Git and GitHub (been using it about a month now as you can see from my GitHub profile). And I'll have to say that I get more impressed the more I  use them.

Yesterday, I showed some really ugly code and mentioned that folks were welcome to offer suggestions through comments or by making a pull request:
Feel free to share your ideas in the comments for this article. Or make a pull request on the GitHub repo (I'm not quite sure how to deal with those since I'm still new to Git and GitHub, but I'll figure it out when it comes up).
Fortunately, my friend Matt Johnson (expert in all things date/time related) took me up on the this and made a pull request.

Help With The Pull Request
I got an email notification about the pull request, and I was happily surprised that it came with instructions:

This is what I needed: the Git command to merge the Pull Request and a bunch of links to review it.

And when I viewed it on GitHub, I got similar help. This is right in the pull request:

And when I clicked on "command line", I got step-by-step instructions:

This is exactly what's needed by someone who is still learning the tools (like me).

I took the easy route. I just clicked the "Merge pull request" button, confirmed the merge, then went to Visual Studio and hit the "Sync" button to get the changes on my local machine.

If you're curious about the changes that Matt made, don't worry. I'll be covering those soon. He made some great improvements to the code, and we'll walk through them in the next article. If you want to look at the changes in the meantime, this is all on the "sunset" branch.

[Update: Here's the review of the changes.]

Wrap Up
The more I use Git and GitHub, the more impressed I am with the features and implementation. Yesterday, I was genuinely baffled about what I would do if someone made a pull request. Today, I merged this into my project with no issues at all.

Now I'm *really* kicking myself for not doing this sooner. But I can't change the past, so I'll just keep moving forward.

Happy Coding!

No comments:

Post a Comment