Changes between Version 9 and Version 10 of StartModPatchAndPullReq


Ignore:
Timestamp:
Mar 30, 2014, 10:22:28 AM (9 years ago)
Author:
Daniel James
Comment:

Put a simple alternative first.

Legend:

Unmodified
Added
Removed
Modified
  • StartModPatchAndPullReq

    v9 v10  
    2424[https://help.github.com/articles/using-pull-requests Read the entire !GitHub article] for more information on pull requests. Having a [https:/github.com !GitHub] account is a prerequisite, so open an account if you don't already have one.
    2525
    26 === Boost Library Pull Request Example===
     26=== Forking a Single Repo ===
    2727
    28 Here is how a pull request works for a Boost library:
     28The simplest way to create a pull request is to fork a single library's repo. You'll have to manually check out your fork every time you update or clone the super project, but this is generally less work than forking the super project yourself. Here's how to do that:
     29
     301. If you haven't already done so, create a local clone of the boost tree:
     31   `git clone --recursive git@github.com:boostorg/boost.git boost`
     322. Go to the !GitHub page for the library's repo, and fork it.
     333. Copy the ssh url for the forked library from the right hand side of the web page.
     344. Add it as a remote to your local repo:
     35   `git remote add myremote ''ssh_url''`
     365. Now you have two remotes: `origin` for the repo in the `boostorg` organisation,
     37   `myremote` for your clone.
     386. Create a branch for your changes: `git checkout origin/develop -b changes`.
     397. Push to your fork: `git push --set-upstream myremote changes`.
     40
     41Now you can create pull requests from the github page for your fork. Be careful to create it for the correct branches.
     42
     43When you update the super project it will switch you back to the branch from boostorg. It's generally easiest to just checkout your branch when you need it, but if you want to have it always checked out, you can create a local branch of the super project:
     44
     451. Go to the root of the super project.
     462. Create a branch: `git checkout origin/master -b updated`.
     473. Edit `.gitmodules` and change the relative url for your module to your fork's ssh url.
     484. Commit your changes to `.gitmodules`: `git add .gitmodules && git commit`.
     495. When you update the module, commit those changes to the super project as well. For example, for Boost.Utility:
     50   `git add libs/utility && git commit`.
     516. You can merge updates from the boost repo using `git pull` - there might be conflicts if the module has been updated on `boostorg`.
     52
     53Unfortunately, if you fork the super project on !GitHub, the other modules won't work, as they're still using relative urls.
     54To avoid this you can edit the `.gitmodules` to use absolute urls - see below for details.
     55Alternatively, a user can clone the super project from `boostorg/boost`, and then add your fork as a remote and pull from that, so that the `origin` remains the `boostorg` repo.
     56
     57=== Forking the super project ===
    2958
    3059First, using a web browser and your !GitHub account, fork the Boost super-project and the Boost library you want to patch. The !GitHub Bootcamp [https://help.github.com/fork-a-repo Fork a Repo] instructions give all the details, but basically you just go to the boostorg repo and click the "Fork" button on the upper-right side of the super-project or library's repo page.