6/17/2023 0 Comments Git submodule set branch> export CURRENT_BRANCH=$(git rev-parse -abbrev-ref HEAD) > Bash snippet it presents as a solution here for completeness's sake: > contained submodules comes from the Stack Overflow answer at > switch between different branches when they don't all have the same > Currently, the only method I've seen that you can reliably use to > something? -, you could send messages here even if you weren't a list > Group, I apologize, but I saw that, unlike there - unless I overlooked > (Note: If this question would fit better on the git-users Google 1:23 ` Bryce Glover 0 siblings, 1 reply 3+ messages in threadįrom: Philippe Blain 22:48 UTC ( / raw) 12:00 ` Automatically Handling Using/Checking Out Branches With One or More Different Contained Submodules? Bryce 22:48 ` Philippe Blain * Re: Automatically Handling Using/Checking Out Branches With One or More Different Contained Submodules? Hypothetically, how involved might that turn out to be?īryce Glover, an amateur Git raw reply 3+ messages in thread Or both of either of those approaches, at least not right away, but, I don't know if I'd personally be up to contributing either one Would, ideally, handle this automatically, perhaps when requested byįlag if it wouldn't make sense for this behavior to be the default That wouldn't be enough of a use case to motivateĪdding that, though, would it? Alternatively, '`git checkout`' Hooks`,' Git doesn't implement a 'pre-checkout' hook, only a This involves invoking some actions before '`git checkout`,' so IĬouldn't have a couple of Git hooks handle this since, per '`git help Git submodule sync & git submodule update -init Switch between different branches when they don't all have the sameĬontained submodules comes from the Stack Overflow answer atīash snippet it presents as a solution here for completeness's sake:Įxport CURRENT_BRANCH=$(git rev-parse -abbrev-ref HEAD) Something? -, you could send messages here even if you weren't a listĬurrently, the only method I've seen that you can reliably use to Group, I apologize, but I saw that, unlike there - unless I overlooked (Note: If this question would fit better on the git-users Google 22:48 ` Philippe Blain 0 siblings, 1 reply 3+ messages in thread I really would like to use git submodules, but it seems like it won't work in my situation, and instead would create multiple copies of each library repo.Automatically Handling Using/Checking Out Branches With One or More Different Contained Submodules? archive mirror help / color / mirror / Atom feed * Automatically Handling Using/Checking Out Branches With One or More Different Contained Submodules? I am thinking of just having a Makefile and some make tasks to download all the repos at the same directory level (not as submodules), and then setup symlinks, sort of like npm link. How can I do like that "symlink a single clone locally" link at the very top of this post? How can I create a good workflow for people trying to contribute to the "framework-library"? They should clone that, and it autoclones the other repos and keeps it all organized. Not ideal either, but better than creating multiple copies of the repo and accidentally making changes in one and not another and then things become confusing and a mess of "which one is my main version of this library?" type of thing. path between projects temporarily as I do stuff. native-wrapper-libraryĪnd just symlinking or even hardcoding a. I have just been currently leaving it like this. 1 at the top-level of this set of projectsĪnd duplicated several of the other library projects too.Then I have 3 or 4 copies of the native-wrapper-library repo: Git submodule add libs/native-wrapper-library If I were to use git submodules, it would create a copy of each module nested inside of it: cd basic-interfaces-library I have a situation where I have these 4 projects, which depend on each other in a non cyclical way. How to `git submodule add` Existing sub Repository?.Can't add git submodule when specified as a relative path.Git submodule inside of a submodule (nested submodules).How to use submodules publicly, but symlinks to a single clone locally?.Here are some links which didn't quite answer the question:
0 Comments
Leave a Reply. |