简体   繁体   中英

Git - Fork boost with submodule

I've run into an issue that isn't clear to me how I can solve it. I'd like to add boost to my project, and I'd like to keep a copy in our team's account so that we can all have the same version. So, I forked boost via the instructions on github ( https://help.github.com/en/github/getting-started-with-github/fork-a-repo ) by essentially clicking a button. I then added boost as a submodule using the appropriate git commands to the project. However, I discovered that boost itself has a number of additional submodules in the libs folder that now don't point to the correct location. It is looking for those submodules in our account instead of from boost.

I'd like to get a copy of all of these and freeze them at their current version just like boost. Do I have to go through and fork every single one of these submodules manually? Or, how should I have set this up correctly to fork boost and bring along a fork of all its submodules? Thanks for any help.

Hello @ConfusedStatGuy,

You can use git <command> --recurse-submodules to perform your operations for submodules inside submodules. This will help you save time by Git dealing with all the submodules on its own rather than you trying to configure/make changes to every submodule.

Also, I think freezing the submodules to a fixed version won't be a really good idea for obvious reasons unless your project does not aim to upgrade to any newer dependencies any soon.

Please refer to this and this for more information.

Best.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM