git-svn: local commits going to svn/trunk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]