Note that there are some explanatory texts on larger screens.

plurals
  1. POResolving Git Svn Conflicts
    text
    copied!<p>I'm using Git-Svn to interact with a Svn repository at work and I can't seem to find a way to effectively resolve conflicts for the life of me. I've read the other questions on this topic, but evidently I need something even more remedial because i always seem to end up in some kind of endless loop. I rebase, use mergetool (meld) to resolve my conflicts and, when I get to the end of all that, I try to do a dcommit and I get a merge conflict during commit error.</p> <p>I know this feels like a duplicate, but frustration is making me ask again, with some very specific details about how I'm going about this so that hopefully someone can tell me exactly where my process is screwed up.</p> <p>My setup:</p> <p>I have a remote branch (svn/trunk), a local branch (trunk) and another local branch that I typically work in (working-trunk). trunk was checked out from svn/trunk and working-trunk was checked out from trunk.</p> <p>Here's what I've been doing:</p> <ol> <li>On my trunk, <code>git svn rebase</code> (returns conflicts)</li> <li><code>git mergetool</code></li> <li>[resolve the conflicts for that file]</li> <li>Save the merged file from meld and close meld.</li> <li><code>git add .</code></li> <li><code>git rebase --continue</code></li> <li>[rinse, repeat]</li> <li>If I get a message asking whether I used <code>git add</code>, I <code>git rebase --skip</code></li> </ol> <p>When I get to the end of all the reported changes, everything just kind of stops and I guess maybe I'm not sure what to do at this point. Git shows nothing to be committed and I appear to be back on the trunk. Git then allows me to dcommit, but if I try a rebase immediately thereafter, I end up re-resolving the conflicts I just resolved.</p> <p>There's clearly a critical piece I'm missing here, but I just don't see it and it's causing a lot of problems and frustration. Merges may be easy in Git, but I'm sure not finding that to be the case.</p> <p>Thanks.</p> <p><strong>UPDATE:</strong> Just wanted to throw out a quick update to describe my workflow in case that's part (or all) of the problem.</p> <p>To start, after cloning my repository with a <code>svn/</code> prefix, I have my <code>svn/trunk</code> remote branch. Given that:</p> <ol> <li>I <code>git co -b trunk svn/trunk</code> to check out my remote to a local branch.</li> <li>I <code>git co -b working-trunk</code> to create a working branch that I use to create one more degree of separation so that my local <strong>trunk</strong> can always mirror my remote trunk.</li> <li>I delete the default master branch (when working with svn, I find it easier to think in terms of "trunk" rather than "master").</li> </ol> <p>Once I have all of my branches, my typical workflow looks like this:</p> <ol> <li>On <strong>working-trunk</strong>, I make my changes and commit them.</li> <li>I <code>git co trunk</code> and do a <code>git svn rebase</code>.</li> <li>Assuming new code was rebased, I <code>git rebase working-trunk</code>.</li> <li><code>git co working-trunk</code></li> <li><code>git merge trunk</code></li> <li><code>git rebase trunk</code></li> <li><code>git co trunk</code></li> <li><code>git merge working-trunk</code></li> <li><code>git svn dcommit</code></li> </ol> <p>It's a lot of steps, I know, but that's what everyone here and elsewhere has recommended. Could my fatal flaw be somewhere in that process?</p> <p>Thanks again.</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