git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git-svn: local commits going to svn/trunk

From
Warren Harris <warrensomebody@gmail.com>
Date
Jun 4, 2010, 16:16 UTC
Message-ID
<F2265BC9-B023-46F9-BA72-ECEE62F23F8D@gmail.com>
I seem to have gotten off the beaten path in my usage of git-svn and could use some advice. I routinely use git-svn to land my personal git repo into a shared svn repo (usually doing a 'git svn rebase', 'git svn dcommit')... but apparently forgot to rebase before a commit a few days ago. My dcommit got a merge conflict so I then rebased and dcommitted again. Now, several days and several dcommits later I realize that I've been working on my svn branch (git stat says "Not currently on any branch.") and the view in gitx shows:
--A--B--C--D'--E... svn/trunk  (where my checkins seem to be going)
  \
    C--D  master

where: A is the common root B is the svn commit that caused my merge problem, C is part of the changes I was trying to land (went cleanly into svn) D is the master commit that had the merge conflict, D' is the commit I made after fixing the conflict (I didn't realize this was going onto the svn branch, not identical to D) E is the beginning of all the checkins I've made after hitting this problem

I believe the steps that got me here were (reconstructing from my history):

-- at D on master git svn dcommit -- forgot to rebase first -- merge problem with B -- accidentally left on the svn branch? git svn rebase -- trying again with a rebase first, but maybe I wasn't on master here? git svn dcommit -- fixed merge conflicts git commit -- created D' locally git svn dcommit -- pushed D' to svn repo -- subsequent checkins to my svn branch instead of master...

Anyway, after realizing this problem last night, I tried to 'git co master', 'git svn rebase' but got massive conflicts. I aborted this, but now I'm wondering how to fix this mess. Maybe 'git co svn/trunk', 'git branch -M master'?... but I don't want to make problems worse.
Warren
Message 1 of 1 in “git-svn: local commits going to svn/trunk”
  1. Warren HarrisJun 4, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.