Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<h2>Standard Subversion layout</h2> <p>Create a git clone of that includes your Subversion trunk, tags, and branches with</p> <pre>git svn clone http://svn.example.com/project -T trunk -b branches -t tags</pre> <p>The <code>--stdlayout</code> option is a nice shortcut if your Subversion repository uses the typical structure:</p> <pre>git svn clone http://svn.example.com/project --stdlayout</pre> <p>Make your git repository ignore everything the subversion repo does:</p> <pre>git svn show-ignore >> .git/info/exclude</pre> <p>You should now be able to see all the Subversion branches on the git side:</p> <pre>git branch -r</pre> <p>Say the name of the branch in Subversion is <code>waldo</code>. On the git side, you'd run</p> <pre>git checkout -b waldo-svn remotes/waldo</pre> <p>The -svn suffix is to avoid warnings of the form</p> <pre>warning: refname 'waldo' is ambiguous.</pre> <p>To update the git branch <code>waldo-svn</code>, run</p> <pre>git checkout waldo-svn git svn rebase</pre> <hr> <h2>Starting from a trunk-only checkout</h2> <p>To add a Subversion branch to a trunk-only clone, modify your git repository's <code>.git/config</code> to contain</p> <pre>[svn-remote "svn-mybranch"] url = http://svn.example.com/project/branches/mybranch fetch = :refs/remotes/mybranch</pre> <p>You'll need to develop the habit of running</p> <pre>git svn fetch --fetch-all</pre> <p>to update all of what <code>git svn</code> thinks are separate remotes. At this point, you can create and track branches as above. For example, to create a git branch that corresponds to mybranch, run</p> <pre>git checkout -b mybranch-svn remotes/mybranch</pre> <p>For the branches from which you intend to <code>git svn dcommit</code>, keep their histories linear!</p> <hr> <h2>Further information</h2> <p>You may also be interested in reading an <a href="https://stackoverflow.com/questions/3140356/working-in-sync-with-svn-upstream/3220481#3220481">answer to a related question</a>.</p>
 

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