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

git svn project shuffle

From
CSChristopher Snapp <snappca@gmail.com>
Date
Oct 4, 2010, 18:36 UTC
Message-ID
<AANLkTimL18WHOrLjA5iWNcsgd6H8Eeq19LfJNjkKu_b-@mail.gmail.com>

I have used git to interface with an svn repo for some time quite successfully, but today I've run into a scenario that I'm not sure how to solve.

The situation is this:
* I have a project (let's call it "oldproj") that has its own
branches, tags, and trunk svn structure
* oldproj is checked out using git svn clone --stdlayout and all has been swell
* due to a CM shuffle oldproj's svn trunk has been copied to a new svn
project (let's call it newproj), so oldproj/trunk has been copied to
newproj/trunk/oldproj
* oldproj's branches and tags directories have been "archived",
meaning it isn't CM guy's intention to bring them over to the newproj
structure.  I don't mind losing the contents of the oldproj's branches
and tags, but I'm not sure how to transition to newproj using my
already checked out git svn clone

My questions are: # If I try to start from scratch by using git svn clone --stdlayout the "newproj" location I lose all of the revision history associated with "oldproj/trunk" that has been copied to newproj/trunk/oldproj. How can I have git understand the history for the newproj/trunk/oldproj location?

# An alternative would be if I could somehow reconfigure my already checked out oldproj git repo so I retain all of the version history and my local branches and can move forward checking code into the newproj/trunk/oldproj location?

Regarding the second question, I'd be concerned that the loss of the branches and tags from the oldproj would confuse things in the future as the newproj branches and tags are new.

This is probably a simple scenario that many have bumped into but my searches have so far come up blank.

Thanks very much for any guidance or pointers to previous discussions regarding this scenario.

-- Chris

Next: Jonathan Nieder
Message 1 of 4 in “git svn project shuffle”
  1. Christopher SnappOct 4, 2010
  2. Jonathan NiederOct 4, 2010
  3. Christopher SnappOct 13, 2010
  4. Jonathan NiederOct 15, 2010

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.