Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>why are you creating a branch for your 2 commits and then merge back? i guess this could give problems, since merges in git work differently from how they work in svn.</p> <p>this should work ("should", but i'm pretty sure it does):</p> <pre><code># on master, no need to create a branch $ git add -p file $ git commit -m "first set of changes" $ git add file $ git commit -m "the remaining changes" # apply your commit on top of eventually new changes upstream $ git svn rebase # commit your 2 commits to svn $ git svn dcommit </code></pre> <hr> <p>in svn branches are just copies of a directory (most often the trunk directory), and merge commits do not differ from normal commits (except the new <code>svn:mergeinfo</code> property starting with svn 1.6)</p> <p>commits in git are different, each commit stores a link to it's parent commit. svn does not need this, as it can simply use REV-1. merge commits in git thus have multiple parents (the merging branch and the merged branch)</p> <p>i do not know what happens if you dcommit a git to svn, but it will probably only commit the merge commit itself, without history (message being something like "merged branch 'bla' into 'master').</p> <p>when you run <code>svn commit</code> only your new changes are sent to the server to save bandwidth. now, merges in git work different and the difference to previous versions will probably not be what you expect it to be, that's why <code>git svn dcommit</code> fails.</p> <p>it even says so in the git svn documentation: do not merge branches using git and dcommit them to svn, it will most likely mess up your history</p> <blockquote> <p>Running git merge or git pull is NOT recommended on a branch you plan to dcommit from. Subversion does not represent merges in any reasonable or useful fashion; so users using Subversion cannot see any merges you've made. Furthermore, if you merge or pull from a git branch that is a mirror of an SVN branch, dcommit may commit to the wrong branch. <a href="http://git-scm.com/docs/git-svn" rel="nofollow noreferrer">git svn docs</a></p> </blockquote>
 

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