I've got a git-svn checkout of my entire repo (initialized in the standard git svn init -t tags -b branches -T trunk $repo_url
fashion, then git svn fetch
ed). I manually svn copy $repo_url/branches/branch1 $repo_url/branches/branch2
. I then ran git svn fetch
, git checkout -b local-branch2 branch2
, made a few commits to branch2
, dcommit
ed them back to the SVN repo, and am done with my work on branch2
. (Why branch a branch? I wanted to hack at this branch locally in git, but still commit back to SVN and get help from a couple of coworkers while I was working on it).
What I haven't done is merge the branch2
work back into branch1
. If I git checkout -b local-branch1 branch1
, then git merge branch2
, it simply fast-forwards my local-branch1
pointer to where branch2
is.
Instead, I want git to replay all commits made since starting branch2
onto branch1, so that I can dcommit each of them to the SVN repo. It seems like there's a way to do this, but I can't think of it. Maybe git rebase
, or a git cherry-pick
of each commit made on branch2
? (though the latter is a bit tedious). I'd rather not svn merge the two URLs together, as that's a big bucket of hurt.
Ideas? Any parts of this need more explanation?