| 27 | First, 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. |
| 28 | |
| 29 | Then do the following from the command line: |
| 30 | |
| 31 | {{{ |
| 32 | 1. Fork boostorg/boost |
| 33 | 2. Clone *just* boostorg/boost, not all the sub-projects (as this will fail): |
| 34 | - `git clone git@github.com:boostorg/boost.git modular-boost` |
| 35 | 2.5 (Optional) Create a branch (I called mine 'updated') |
| 36 | 3. Edit .gitmodules and change all the relative URLs to absolute, SSH |
| 37 | or HTTPS (whichever kind you or your company firewall likes). |
| 38 | - I ran `:%s/\.\./https:\/\/github.com\/boostorg\/utility.git/g` in |
| 39 | vim to use https. |
| 40 | 3. Fork the particular repos you want to apply patches to: |
| 41 | - For this example, I forked 'range'. |
| 42 | 4. Edit the 'range' url line in boost/.gitmodules to point to your fork: |
| 43 | - I changed the https://github.com/boostorg/range.git to |
| 44 | git@github.com:ncrookston/range.git. |
| 45 | 5. Commit your gitmodules change, push it to your fork: |
| 46 | - `git commit -a -m "create local boostorg"; git push origin updated` |
| 47 | 6. Now get all the submodules: |
| 48 | - `git submodule update --init`. |
| 49 | |
| 50 | You should see it fetch most libraries from boostorg, but those you've |
| 51 | edited will be registered with the URL you gave in step 4. |
| 52 | |
| 53 | If you need to make a fresh clone it's straightforward: |
| 54 | If you created a new branch: |
| 55 | - `git clone -b updated --recursive |
| 56 | git@github.com:ncrookston/boost.git modular_boost` |
| 57 | If you did not: |
| 58 | - `git clone --recursive git@github.com:ncrookston/boost.git modular_boost`}}} |
| 59 | |