Products

Solutions

Resources

Partners

Community

About

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

The Community Blog is a personal opinion of community members and by no means the official standpoint of DNN Corp or DNN Platform. This is a place to express personal thoughts about DNNPlatform, the community and its ecosystem. Do you have useful information that you would like to share with the DNN Community in a featured article or blog? If so, please contact .

The use of the Community Blog is covered by our Community Blog Guidelines - please read before commenting or posting.


Awesome Pull Request received? Merge it in!

So, you’re a developer or coordinator on a codeplex project. And while you where working on some brilliant new feature, another developer tumbled over a minor glitch in your code. Since he read my previous post on how to contribute to a codeplex project that’s on Git, he will fix the bug and send you a pull request.

But then what? Well, you will have to review what he’s done, and either accept or decline the pull request. Since Codeplex itself has some pretty decent document on Applying Pull Requests, I’ll just point you there.

You just go right ahead and read that, while I listen to some intermission.

Alright, good to have you back. So, when I go back to NB_Store on Codeplex, I’ll see what I got from my last post: An accpeted pullrequest:

image

When I accepted the pull request, codeplex already mentioned that I wasn’t done yet:

Note: Accepting this pull request will not merge the changes. You will need to do this manually by running the following commands locally:

1. Pull the changes into your local repository. We recommend that you create a new branch to test out the changes first.

2. If you're satisfied, merge the changes and push them back to your repository on CodePlex.

  • git checkout master
  • git merge superska/nbstore
  • git push origin master

But, to be honoust, I’m not really into those git command line things. So, let’s see what we need to do with TortoiseGit.

Switching to the master

To be able to merge my changes in, I need to make sure I’m merging the changes in the right version of the code. So now, I need to forget about the origin repository for a while and make sure I’m working the master branch of NB_Store itself.

Please note that normally, the person sending the Pull request, will probably not be same one merging the changes in. But it doesn’t really matter from which repository you are switching. It just matters that you’re switch to the right one.

Since I was working on a fork of NB_Store, the assumption is, I can’t work directly on NB_Store. Which makes sense, because if I could, I wouldn’t need to fork it. Unless of course, I’m writing a blogpost about that process and… oh well, you get the point. So what I need to do now to get my working folder linked to the master branch of NB_Store itself, is of course clone it in 3 simp[le steps.

To be able to easily switch to using my fork again later on, I just renamed my original folder. Since all the Git information is stored inside it, this works brilliantly. I’ll just rename it back later on. To clone the NB_Store master branch…

One:

image

Two:

2014-04-24_22-32-27_Contributing to a CodePlex Project that’s on Git - Windows Live Writer

Three:

image

Wait a bit ‘till everything’s downloaded and we’re done.

Pulling in the changes

Next task is to pull in the changes this “superska” guy sent me in his pull request. Since CodePlez already allowed me to view the changes in the pull request, I’m perfectly fine pulling them right in the master branch.

image

If I wasn’t, I’d just create a feature branch for it, pull the changes there, test them and later on, merge that branch back into master.

But now, I use TortoiseGit—> Pull to pull in the changes from the request:

image

The status window gives me a button “Pulled Diff” to review the changes once again. Now I should test the code and make sure I want to

Merge that new stuff in!

To merge the new code into the NB_Store master branch, I need to chackout that master branch again first: TortoiseGit, Switch/Checkout, chose branch “remotes/origin/master”.

To merge the changes in, chose TortoiseGit, Merge. Select the Commit radio button in the dialog.:

image

The only way I found to get a hold on that changeset SHA-1 key, is to go to NB_Store on codeplex, go to Source Code, Pull Requests, and take it from the URL here:

2014-04-30_00-25-21_NB_Store - Free DotNetNuke Ecommerce Catalog Module - Source Code - Internet Exp

The master demands commitment

The merge is already committed to my local repository, so I didn’t see the red icons I expected at first. Since it’s committed locally, I need to push it to origin/master (because I’m working on the NB_Store project now, and not on a fork, origin is now nb_store/master):

image

And since the proof of the pudding is always in the eating:

image

Hope this helps understanding (and working with) git a bit. I know it helped me to figure things out.

Comments

There are currently no comments, be the first to post one.

Comment Form

Only registered users may post comments.

NewsArchives


Aderson Oliveira (22)
Alec Whittington (11)
Alessandra Daniels (3)
Alex Shirley (10)
Andrew Hoefling (3)
Andrew Nurse (30)
Andy Tryba (1)
Anthony Glenwright (5)
Antonio Chagoury (28)
Ash Prasad (37)
Ben Schmidt (1)
Benjamin Hermann (25)
Benoit Sarton (9)
Beth Firebaugh (12)
Bill Walker (36)
Bob Kruger (5)
Bogdan Litescu (1)
Brian Dukes (2)
Brice Snow (1)
Bruce Chapman (20)
Bryan Andrews (1)
cathal connolly (55)
Charles Nurse (163)
Chris Hammond (213)
Chris Paterra (55)
Clint Patterson (108)
Cuong Dang (21)
Daniel Bartholomew (2)
Daniel Mettler (181)
Daniel Valadas (48)
Dave Buckner (2)
David Poindexter (12)
David Rodriguez (3)
Dennis Shiao (1)
Doug Howell (11)
Erik van Ballegoij (30)
Ernst Peter Tamminga (80)
Francisco Perez Andres (17)
Geoff Barlow (12)
George Alatrash (12)
Gifford Watkins (3)
Gilles Le Pigocher (3)
Ian Robinson (7)
Israel Martinez (17)
Jan Blomquist (2)
Jan Jonas (3)
Jaspreet Bhatia (1)
Jenni Merrifield (6)
Joe Brinkman (274)
John Mitchell (1)
Jon Henning (14)
Jonathan Sheely (4)
Jordan Coopersmith (1)
Joseph Craig (2)
Kan Ma (1)
Keivan Beigi (3)
Kelly Ford (4)
Ken Grierson (10)
Kevin Schreiner (6)
Leigh Pointer (31)
Lorraine Young (60)
Malik Khan (1)
Matt Rutledge (2)
Matthias Schlomann (16)
Mauricio Márquez (5)
Michael Doxsey (7)
Michael Tobisch (3)
Michael Washington (202)
Miguel Gatmaytan (3)
Mike Horton (19)
Mitchel Sellers (40)
Nathan Rover (3)
Navin V Nagiah (14)
Néstor Sánchez (31)
Nik Kalyani (14)
Oliver Hine (1)
Patricio F. Salinas (1)
Patrick Ryan (1)
Peter Donker (54)
Philip Beadle (135)
Philipp Becker (4)
Richard Dumas (22)
Robert J Collins (5)
Roger Selwyn (8)
Ruben Lopez (1)
Ryan Martinez (1)
Sacha Trauwaen (1)
Salar Golestanian (4)
Sanjay Mehrotra (9)
Scott McCulloch (1)
Scott Schlesier (11)
Scott Wilkinson (3)
Scott Willhite (97)
Sebastian Leupold (80)
Shaun Walker (237)
Shawn Mehaffie (17)
Stefan Cullmann (12)
Stefan Kamphuis (12)
Steve Fabian (31)
Steven Fisher (1)
Tony Henrich (3)
Torsten Weggen (3)
Tycho de Waard (4)
Vicenç Masanas (27)
Vincent Nguyen (3)
Vitaly Kozadayev (6)
Will Morgenweck (40)
Will Strohl (180)
William Severance (5)
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out