<div dir="ltr"><div><div>Suppose you're on branch A and have some extra commits there. The natural option would be rebase master on top of A, delete A, and dcommit from master to svn:</div><div><div>git rebase A master  # any commits to master will follow after those in A<br></div><div>git branch -d A<br></div><div>git svn dcommit  # pushing any commits on A or on master to svn<br></div><div><br></div></div></div><div>But it's not necessary to be on the master branch when you use git svn dcommit; unlike git push and git pull, for which each of your branches may have a remote git branch which it tracks (meaning, which push and pull act on), git svn dcommit/rebase appears to just default to the 'wip' svn trunk/branch if you're on some git branch that doesn't have an svn branch of the same name (eg "web" or "dwimmercrafty" git branches).</div><div>So "git svn dcommit" will 1) fetch any new svn wip commits you don't have yet, 2) rebase the current branch on top of svn/wip, 3) make commits to svn (and update svn/wip). Well, actually I think the real order is 3, 1, 2? Since IIRC svn lets you make commits without updating first, as long as none of the same files have been modified? Making an svn commit without even having the latest svn revision so that you can verify it compiles seems fairly harmless as long as you at least test it immediately afterwards. But it happens to me by accident all the time when you've made a commit I wasn't aware of, and I've not once had a problem result from it.<br></div><div><br></div><div>So anyway, if you're on branch A, you can just do:</div><div></div><div>git svn dcommit</div><div>git checkout master</div><div>git svn rebase  # If there were no extra commits to master, master and A should now be identical<br></div><div>git branch -d A<br></div><div><br></div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On 5 September 2017 at 11:06, James Paige <span dir="ltr"><<a href="mailto:Bob@hamsterrepublic.com" target="_blank">Bob@hamsterrepublic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hey, TMC, what workflow do you use when you want to merge a feature branch before you "git svn dcommit" it?<br><br></div>I remember being warned that ordinary merges are a source of problems.<br><br>---<br></div>James<br></div>
<br>______________________________<wbr>_________________<br>
Ohrrpgce mailing list<br>
<a href="mailto:ohrrpgce@lists.motherhamster.org">ohrrpgce@lists.motherhamster.<wbr>org</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer" target="_blank">http://lists.motherhamster.<wbr>org/listinfo.cgi/ohrrpgce-<wbr>motherhamster.org</a><br>
<br></blockquote></div><br></div>