Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Say we have a skeleton Subversion repository with empty <code>trunk/</code>, <code>branches/</code>, and <code>tags/</code>:</p> <pre>/tmp$ git svn clone -s file:///tmp/svn-repo/ git-svn-repo Initialized empty Git repository in /tmp/git-svn-repo/.git/ r1 = 80bdcfc0cf248b74b914a1b5f99ab89fb4e31b6c (refs/remotes/trunk) Checked out HEAD: file:///tmp/svn-repo/trunk r1 /tmp$ cd git-svn-repo/ /tmp/git-svn-repo$ git svn branch my-branch Copying file:///tmp/svn-repo/trunk at r1 to file:///tmp/svn-repo/branches/my-branch... Found possible branch point: file:///tmp/svn-repo/trunk => file:///tmp/svn-repo/branches/my-branch, 1 Found branch parent: (refs/remotes/my-branch) 80bdcfc0cf248b74b914a1b5f99ab89fb4e31b6c Following parent with do_switch Successfully followed parent r2 = 56150bbd9d3aec94972ff46d030e30ec726595ab (refs/remotes/my-branch)</pre> <p>The explanation below will switch back-and-forth between two views of the same repository, a Subversion working copy of the entire repo (not just <code>trunk</code>) and a <code>git-svn</code> clone. For clarity, each shell prompt's prefix will indicate the current directory.</p> <p>On the svn side, you'll now see</p> <pre>/tmp/svn-repo-wc$ svn up A branches/my-branch Updated to revision 2.</pre> <p>You'll also see the new branch on the git side:</p> <pre>/tmp/git-svn-repo$ git branch -r my-branch trunk</pre> <p>To commit to the newly created branch, first switch to it:</p> <pre>/tmp/git-svn-repo$ git reset --hard remotes/my-branch HEAD is now at 2c9bef2 Create branch my-branch</pre> <p>Next, we'll create a dummy git commit</p> <pre>/tmp/git-svn-repo$ touch on-my-branch /tmp/git-svn-repo$ git add on-my-branch /tmp/git-svn-repo$ git commit -m 'First commit to my-branch' [master b94a0eb] First commit to my-branch 0 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 on-my-branch</pre> <p>and finally send it to Subversion:</p> <pre>/tmp/git-svn-repo$ git svn dcommit Committing to file:///tmp/svn-repo/branches/my-branch ... A on-my-branch Committed r3 A on-my-branch r3 = d3c5ba3e03e5cdee96f470ff4c9898eb7c523ed8 (refs/remotes/my-branch) No changes between current HEAD and refs/remotes/my-branch Resetting to the latest refs/remotes/my-branch</pre> <p>The Subversion working-copy gives us confirmation:</p> <pre>/tmp/svn-repo-wc$ svn up A branches/my-branch/on-my-branch Updated to revision 3.</pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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