On Mon, Feb 08, 2010 at 07:37:02PM -0800, stefano wrote:
> I a n00b using GIT, i have some questions about how yo use git with
> two repositories
> I'm going to use cakephp (1.3 branch) . cakephp have is own repository
> in github.com (git://github.com/cakephp/cakephp1x.git)
> I need switch the branch to get the version 1.3 so this are my
> commands
> git clone git://github.com/cakephp/cakephp1x.git
> git branch --track 1.3 origin/1.3
> git checkout 1.3
> We this commands a got some folders like cake, app, vendors and some
> files index.php and .htaccess (in my root folder).
> In the folder "app" i have all my source. I wanna control this folder
> i my own git repository and snyc the folder "cake" with the info of
> cakephp's repository (in svn i use svn externals cake http://repository
> to do that but now i'm lost in git)

  What you are trying to do is not the usual mode of operation in Git;
normally, the whole tree is always in a single repository. Please
rethink if you really need multiple repositories.

  If you insist, there are two ways to achieve what you want in Git
(albeit not as conveniently as in Subversion in some cases):

  * Submodules. See man git-submodule for details; a submodule ties
a particular revision of given repository to a subdirector.

  * Subtrees. Google 'git-subtree' for an in-development third-party
tool, or you could do it all manually using the 'subtree' merge
strategy. This works like the "merge" operation, but merges content to
a subdirectory. So you will be able to merge in your application
periodically to the "app" subdirectory and your repository will include
all history of the main tree _and_ the app subdirectory.

                                Petr "Pasky" Baudis
If you can't see the value in jet powered ants you should turn in
your nerd card. -- Dunbal (464142)

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to