git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: submodule add does not consider git svn

From
Jens Lehmann <jens.lehmann@web.de>
Date
Jul 24, 2011, 19:44 UTC
Message-ID
<4E2C7627.8050104@web.de>
In-Reply-To
<CAJs9aZ8fAPzr6Lo1EUO+Lnr1pHm=dNr6P5oYgpXE1RqkmMX7hA@mail.gmail.com>
Am 24.07.2011 10:00, schrieb rupert THURNER:
Show 17 quoted lines
> On Sat, Jul 23, 2011 at 20:19, Jens Lehmann <Jens.Lehmann@web.de> wrote:
>> Try the following instead:
>>
>> git init test
>> cd test
>> git svn clone https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/pkg/GeoIP/trunk GeoIP
>> git submodule add ./GeoIP      # Add existing git svn repo GeoIP in place
>> cd GeoIP
>> git svn rebase
>>
>> Of course when you push that submodule somewhere else using git I expect
>> that "git svn rebase" won't work when you clone that somewhere else, just
>> like it happened in your example.
> 
> how would the standard git case work, to continue with the example above:
>   git clone test test1
>   git clone test1 test2

I don't think you should clone "test" directly, but rather push that to a bare repo or git server so others can clone from there. And as the GeoIP submodule is its own git repo, it has to have someplace to be pushed to too. That url must be configured in the .gitmodules file and you have to call "git submodule sync" before you commit and push the "test" superproject and push the GeoIP submodule so others can use "git submodule init" and "git submodule update" in their "test" clone to get the submodule too.

The "test" repo you set up with "git svn clone" could be where you integrate changes coming from svn (git svn people please stop me if this is rubbish, I'm just making assumptions here!) which are then pushed to the shared git repo so your coworkers can fetch it from there.

> if then sombody changes test, and i want to get these changes into
> test2, without involving test1, and rebase what is there?

I'm not sure I understand what you mean here. But you can control what to check out using different branches for different purposes.

Previous: rupert THURNER
Message 4 of 4 in “submodule add does not consider git svn”
  1. rupert THURNERJul 23, 2011
  2. Jens LehmannJul 23, 2011
  3. rupert THURNERJul 24, 2011
  4. Jens LehmannJul 24, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.