Re: How-to combine several separate git repos?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Wink Saville
Date: Sunday, December 9, 2007 - 12:12 pm

Alex Riesen wrote:
Yes, I currently have:

  ~/prgs/android/StateMachine
  ~/prgs/android/test2
  ~/prgs/android/test-annotation

I'd with 3 git repo's in StateMachine, test2 & test-annotation.
Ideally I was thinking having using submodules as they
separate but related. But not sure submodules are ready.
So the above isn't what I want, but for grins I tried it, and got to
this point:

wink@ic2d1:$ cd StateMachine
wink@ic2d1:$ cat .git/config
[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
wink@ic2d1:$ git config remote.test2.url ../test2
wink@ic2d1:$ git config remote.test2.fetch 'refs/heads/*:refs/test2/*'
wink@ic2d1:$ cat .git/config
[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
[remote "test2"]
        url = ../test2
        fetch = refs/heads/*:refs/test2/*
wink@ic2d1:$ git fetch test2
warning: no common commits
remote: Counting objects: 24, done.  
remote: Compressing objects: 100% remote: (16/16), done.  
remote: Total 24 (delta 3), reused 0 (delta 0)
Unpacking objects: 100% (24/24), done.  
 From ../test2
 * [new branch]      master -> refs/test2/master
wink@ic2d1:$ git checkout -b test2 test2/master
Branch test2 set up to track remote branch refs/test2/master.
Switched to a new branch "test2"
wink@ic2d1:$ git status
# On branch test2
nothing to commit (working directory clean)
wink@ic2d1:$ git status
# On branch test2
nothing to commit (working directory clean)
wink@ic2d1:$ git branch -a
  master
* test2
wink@ic2d1:$ git checkout master
Switched to branch "master"
wink@ic2d1:$ git checkout test2
Switched to branch "test2"

So that worked, but as I mentioned not quite what I want
as I want to "see" them all simultaneously.

Starting over (restoring the original from a tar backup)
this didn't work I get:

wink@ic2d1:$ cd StateMachine
wink@ic2d1:$ git merge ../test2/master
../test2/master - not something we can merge

So the first suggestion works, but I don't want them as
separate branches as I want to work on the simultaneously
and they'll share common code.

Another option I was thinking would work for me would be to use
submodules. But I'm not sure submodules are ready for
neophytes and maybe it doesn't do what I want?

Thanks,

Wink Saville

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
How-to combine several separate git repos?, Wink Saville, (Sat Dec 8, 11:34 pm)
Re: How-to combine several separate git repos?, Alex Riesen, (Sun Dec 9, 3:43 am)
Re: How-to combine several separate git repos?, Wink Saville, (Sun Dec 9, 12:12 pm)
Re: How-to combine several separate git repos?, Daniel Barkalow, (Sun Dec 9, 12:55 pm)
Re: How-to combine several separate git repos?, Wink Saville, (Sun Dec 9, 4:44 pm)
Re: How-to combine several separate git repos?, Daniel Barkalow, (Sun Dec 9, 6:11 pm)
Re: How-to combine several separate git repos?, Wink Saville, (Sun Dec 9, 7:29 pm)
Re: How-to combine several separate git repos?, Daniel Barkalow, (Sun Dec 9, 8:01 pm)
Re: How-to combine several separate git repos?, Wink Saville, (Sun Dec 9, 11:36 pm)
Re: How-to combine several separate git repos?, Daniel Barkalow, (Sun Dec 9, 11:51 pm)
Re: How-to combine several separate git repos?, Wink Saville, (Mon Dec 10, 12:01 am)
Re: How-to combine several separate git repos?, Alex Riesen, (Mon Dec 10, 12:52 am)
Re: How-to combine several separate git repos?, Wink Saville, (Mon Dec 10, 10:55 am)