top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration
Print Preview

Subtree split the parent project without the added subprojects in Git

+2 votes

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 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 Google+ Share Button LinkedIn Share Button Multiple Social 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

For example,
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 " ?

Useful Links with Similar Problem
Contact Us
+91 9880187415
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Karnataka INDIA.