Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I use two SVN projects and corresponding git-svn branches with a single working directory?
    primarykey
    data
    text
    <p>I'm relatively new to Git, but I want to give it a try (vs SVN and Bazaar).</p> <p>Can anyone recommend me a workflow for a situation similar to the following:</p> <ul> <li>1 SVN repo, with several projects</li> <li>1 working copy "src"</li> </ul> <p>The ideea is that in "src" I need to checkout project A or sometimes project B. Both projects have several branches.</p> <p>For now, I have made 2 git clones of the SVN repo, one for each project. (I would have preferred --bare repos, but it does not work with <code>git svn clone</code>)</p> <p>Then, I made a git repo in "src", and <code>git remote add projA ..a_repo_git</code>, "<code>git remote add projB ..b_repo_git</code>".</p> <p>Now, I can see both of them from "src" using "git remote", and I can see their branches with "git remote show projA"</p> <p>And now the trouble.. </p> <ul> <li>How can I get in "src" any of the branches in projA/projB ?</li> <li>How can I modify them, and then be able to push them back (first to the git_repos, or directly to the SVN repo)?</li> <li>Is this "workflow" ok, or do you have a better idea?</li> </ul> <p>I did try in src: <code>git checkout --track -b work_branch projA branch_in_A</code> and after some fiddleing with "fetch" I managed to get the things. But then, I had problems pushing it back to the <code>a_repo_git</code>, and then to SVN. It was mostly trial and error.</p> <p>I have to admit, I still have problems with remote branches! (and I get lost when I have to use "<code>origin local_branch:origin_branch</code>" or "<code>origin origin_branch:local_branch</code>", or "<code>origin origin_branch</code>" or "<code>origin/origin_branch</code>"! Back to the Git manual for some more reading.)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload