Forks

 

Fork Actions on Change Set Listing Page

All fork actions are available directly from the Source Code page.

Creating Forks / Pull Requests

The following steps are applicable to all registered CodePlex users.

Step 1: Create a new Fork of a Project

  • Go to the Source Control tab of a Git or Mercurial project.

  • Click on the “Fork” action bar link and click “Create new fork”.

image

  • Specify a name that will distinguish your intentions, and optionally enter in a description of what the fork is used for.

image

  • Once the fork has been created, you’ll be redirected to the changeset history view of your fork.

Step 2: Fork Clone, Commit, and Push

  • On your fork page, you can get the clone URL by clicking “Clone” in the action bar.

image

  • Use your favorite Git or Mercurial tool to create a local clone of the repository.

image

Since this is your repository, you have full capabilities of committing locally, and pushing changes back up to the central server. This is a key distinction for forks, as the changes in your fork ARE NOT pushed into the central project repository.

Central project changeset history:

image

Fork changeset history:

image

Gitk:

image

 

Step 3: Create a Pull Request

Once you have pushed all of your changes to your fork (as well as making sure you have pulled the latest changes from the central repository), you’re ready to create a pull request.

  • From anywhere in the Source Code tab, click “Send Pull Request” in the action bar and select your fork

image

  • On the Create Pull Request page, you can enter a title, comment, and review your changeset before sending. You also have the option of sending a pull request between branches in the same project

image

  • At this point, your pull request is waiting to be applied by project coordinators or developers. Once they have applied or denied your pull request, you will receive an email with their comments.

 

Applying Pull Requests

The following steps are applicable to project coordinators or developers for a project only.

If you are a Mercurial project owner, and need to get access to unapplied patches, please contact us.

Step 1: Reviewing / Apply Pull Request

  • As a project contributor, when you visit the pull request listing page, you’ll see that you have the ability to subscribe to pull request notifications.

  • When a user submits a pull request, you’ll receive an email with their comments and a link to the Fork.

image

  • Once a pull request has been submitted, you can review the proposed changes by navigating to the Pull Request listing and clicking on the pull request you want to review

image

  • From here you can get the details of the pull request, an even provide code review comments in the diff view

image

  • You can also get an overall view of the comments that reviewers have made by clicking on the Comments tab

image

 

Step 2: Incorporating the pull request

After you’ve reviewed the changes, you may decide to merge the pull request into your project source. Clicking the Accept link in the pull request view page will bring up a dialog with detailed instructions on how to merge the code:

image

Note that merely accepting the pull request does not automatically merge the changes into your code. You’ll need to follow the manual steps provided in this dialog box to complete the task.

If you decide not to accept the pull request, you can use the Decline link. Keep in mind that it’s courteous to give really good feedback when declining a pull request. The user is now able to send another pull request with new changes they’ve made to their fork.

Last edited Sep 26, 2012 at 1:24 AM by tomcornelius, version 3