On Sat, Nov 23, 2013 at 12:55 AM, Nathan Crookston < nathan.crookston@gmail.com> wrote:
Okay, I actually just tried this and it worked just fine.
Nice!
My steps were:
1. Fork boostorg/boost 2. Clone *just* boostorg/boost, not all the sub-projects (as this will fail): - `git clone git@github.com: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.
By the way, what was the benefit of using relative paths for submodules? Also, isn't there a git command to automatically get the full paths?
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 git@github.com:ncrookston/range.git. 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 git@github.com:ncrookston/boost.git modular_boost` If you did not: - `git clone --recursive git@github.com:ncrookston/boost.git modular_boost`