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

Re: Git and git-svn question.

From
JQJean-Baptiste Quenot <jbq@caraldi.com>
Date
Mar 28, 2008, 11:27 UTC
Message-ID
<ae63f8b50803280427m55f6b957r12745c8e4178588b@mail.gmail.com>
In-Reply-To
<47ECA3DC.8010901@sezampro.com>
Hi Bosko,
2008/3/28, Bosko Ivanisevic <ivanisev@sezampro.com>:
Show 7 quoted lines
> My company uses SVN and I have to work on the code from two offices.
>  Since SVN is far away from git in branching I've decided to set up git
>  repository as a mirror of company's SVN repo, which I would use as
>  intermediate repository for my code:
>
>  git svn clone -t tags -b branches -T trunk
>  svn+ssh://company_server/path_to_svn_repo --prefix=company/
-t tags -b branches -T trunk == -s
Show 5 quoted lines
>  Since I just started to use git I wonder if anyone can give me any hint
>  what is the best way to accomplish following tasks with git:
>
>  - In office 1 and office 2 I clone git repository that is a mirror of SVN:
>    git clone ssh://company_server/path_to_git_repo

You can't do that as SVN information is not cloned. You have to call git-svn clone on every working copy.

Show 13 quoted lines
>  - I start new feature in office 1 based on the trunk version of SVN:
>    git checkout -b new-feature company/trunk
>
>  - Work on this feature is not finished and, after few commits to the
>  local 'new-feature' branch, I have to move to office 2.
>
>  - From office 1 I push local branch 'new-feature' to the git repository
>  on company server.
>
>  - In office 2 pull changes and continue to work on 'new-feature' branch
>  created from office 1.
>
>  - Commit everything in the git repository on company's server.

Yes you'll need also a central Git repository to work with plain Git branches between the offices.

>  - Finally commit everything to the SVN repository.

I suggest to use cherry-pick to propagate the changes from the feature branch to the SVN-aware branch.

All the best,
-- 
Jean-Baptiste Quenot
http://caraldi.com/jbq/blog/
Previous: Bosko IvanisevicNext: Bosko Ivanisevic
Message 2 of 4 in “Git and git-svn question.”
  1. Bosko IvanisevicMar 28, 2008
  2. Jean-Baptiste QuenotMar 28, 2008
  3. Bosko IvanisevicMar 28, 2008
  4. Bob CottonMar 28, 2008

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.