On Oct 17, 2008, at 11:28 PM, Chris Parrish wrote:

Tim Gossett wrote:
On Fri, Oct 17, 2008 at 11:03 AM, Chris Parrish <
[EMAIL PROTECTED]> wrote:


So, to make sure I understand...

If I have an extension of mine in a submodule of a project, I can develop
within that extension:

 * make changes in that copy of the extension (testing its behavior
   as part of the project)
 * commit those changes to the submodule's repo
 * manage branching (gitk, etc) from within that submodule

If so, that helps me a lot.  Everything I'd read made it sound like
submodules don't behave like a working git repo which is why I thought you couldn't push changes back to the original -- that submodules only permitted
data transfer one-way (from source to your local copy).



The way I understand it, from a developing perspective, the extension is simply a git repo that happens to exist within another git repo. You can pull, develop, commit, and push with the extension just as you would any
other project managed with git. The difference here is when you pull,
develop, commit, and push from the master project (the Radiant install in your case), you'll need to consider what's happening with your extension.

Do I understand it correctly?


Hmm.  Now I'm not sure that I've got git yet...

I understand that if my submodule's repo changes, I need to go to the project's repo and 'git submodule update' as Sean mentioned.

But what if I make a change in my project and that makes me think "hey, that means I need to change something in my extension too." Can I change the code directly in the extension (submodule) and somehow tell git to update the extension's source repo? Better still can I create a branch of my extension using the submodule to try out some ideas as they relate to my project and otherwise manage the submodule like any git repo?

Or do I have to go to the extension's repo and work on my changes there (apart from the Radiant project), then go back to my project and update those changes into my submodule?

I guess the question is "is a submodule (the copy checked out into my project) a full-fledged git repo that you can branch, change, etc (all from within the project)?"

Yes. Just "cd vendor/extensions/whatever" and do your git stuff there, commit those changes from there to that repo, then "cd ../../.." and commit the altered submodule. I'm no pro with git, but I'm relatively confident that'll do it.

-Jim
_______________________________________________
Radiant mailing list
Post:   [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to