Subject: Re: [boost] Post-git forking process
From: Nathan Crookston (nathan.crookston_at_[hidden])
Date: 2013-11-22 18:55:50
Nathan Crookston wrote:
> Klaim - Joël Lamotte wrote:
>> You should fork
>> A. the super repository. boostorg/boost, which will give you a way to
>> modify which submodules are used;
>> B. the specific library
>> Fork them either on github or in a place available to your team, as long as
>> they can access it it's fine.
>> Then locally:
>> 1. clone your boost super fork;
>> 2. in this clone, change the address of the submodule you want to use your
>> own library fork with;
> Just to clarify this step, since the other urls in the .gitmodules
> file are relative, you'll need to make them absolute and point them to
> the boostorg ones (unless you want to fork *all* the boostorg repos).
>> 3. this is a change, commit it, then push it up to your fork;
>> 4. now your boost super repo fork is pointing to your sub library fork as
>> a submodule, instead of the official repository of this library;
>> 5. this one I'm not sure is necessary: now pull from your fork and make
>> sure your local version is using the right submodule address (to your
>> library fork);
>> 6. each time you want to upgrade any of these forks, you'll need to pull
>> from the original repositories and then merge with your changes;
>> 7. if the forks are on github, indeed you can easily submit pull requests
>> but still continue with your version if it's not accepted yet or ever;
> With that, I think it should work, though I'll also be unable to test
> for a couple days.
Okay, I actually just tried this and it worked just fine. My steps were:
1. Fork boostorg/boost
2. Clone *just* boostorg/boost, not all the sub-projects (as this will fail):
- `git clone git_at_[hidden]:boostorg/boost.git modular-boost`
2.5 (Optional) Create a branch (I called mine 'updated')
3. Edit .gitmodules and change all the relative URLs to absolute, SSH
or HTTPS (whichever kind you or your company firewall likes).
- I ran `:%s/\.\./https:\/\/github.com\/boostorg\/utility.git/g` in
vim to use https.
3. Fork the particular repos you want to apply patches to:
- For this example, I forked 'range'.
4. Edit the 'range' url line in boost/.gitmodules to point to your fork:
- I changed the https://github.com/boostorg/range.git to
5. Commit your gitmodules change, push it to your fork:
- `git commit -a -m "create local boostorg"; git push origin updated`
6. Now get all the submodules:
- `git submodule update --init`.
You should see it fetch most libraries from boostorg, but those you've
edited will be registered with the URL you gave in step 4.
If you need to make a fresh clone it's straightforward:
If you created a new branch:
- `git clone -b updated --recursive
If you did not:
- `git clone --recursive git_at_[hidden]:ncrookston/boost.git modular_boost`
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk