top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Subtree split the parent project without the added subprojects in Git

+2 votes
377 views

I am trying to use subtree instead of submodules to manage a project, but I don't know how to send the parent project alone. Let me explain my self.

We have a project split in a parent repository and some plug-in repositories. One can use the parent project alone or adding plugins with

"git subtree add --prefix=plugin-a https://github.com/my-project/plugin-a.git master"

After the development is ready, one can split and commit the changes in the plugin but I don't know how to commit the parent project without plugins.

posted Aug 8, 2013 by Luv Kumar

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+1 vote

I have a large Git project which I would like to dissect into subprojects with their own repositories. Git subtrees are ideal for this task: I first

  • create a branch with the contents of only one subfoldergit subtree split -P -b

and then

  • pull this branch into another repository.

For a transitional phase, I would like to have the subprojects read-only and sync them from master. The question is how to organize this. For every commit to master, I could of course perform the above procedure repeatedly for all subprojects, but this seems less then ideal since it does all the work all over again.

Is there a way to merge master into the subtree branches?

+1 vote

The git-subtree manpage is currently missing from the git-manpages tarballs at https://code.google.com/p/git-core/.

For example, https://code.google.com/p/git-core/downloads/detail?name=git-manpages-1.8.5.1.tar.gz
does not include it.

A side effect of this is that "git help subtree" fails when using git installed from homebrew, because the homebrew recipe uses those tarballs as its source of documentation.

+2 votes

I see over the last year (on the web and in this mailing list) there was some activity to extend subtree with a .gittrees file and push-all/pull-all commands.

Perhaps I missed it, but looking through the latest git code on the github mirror I can't find any reference to the .gittrees file or these commands.

Does anyone know the status of this feature? Was it decided that this was a bad idea and the feature has been rejected? Or is this a feature still "cooking"...which will likely make it into git mainline at some point?

I ask because I would like to use something like this to be able to keep a combined repository and separate project repositories in sync. Of course, if it was decided that this feature is fundamentally a bad idea then I will do something different.

Any pointers.

+2 votes

When does git shows message "nothing added to commit but untracked files present " ?

...