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

Re: git-svn multiple branches and merging

From
ILIgor Lautar <igor.lautar@gmail.com>
Date
Mar 12, 2009, 09:31 UTC
Message-ID
<5fdd0830903120231t2ba2f126of41030161869cd33@mail.gmail.com>
In-Reply-To
<5fdd0830903020409j6e2b5269ubfb3ae6fe8266734@mail.gmail.com>
Hi,
Figured out a (little) better way.

Say A is point where last merge was done and B is head of branch we want to cherry-pick from:

for c in $(git-rev-list --reverse A...B); do git-cherry-pick $c; done

I'm sure for can be replaced with something better, but it works for me. However, I still need last merge (cherry-pick) point. It would be nice to hear if anybody has a better idea...

Regards, Igor

On Mon, Mar 2, 2009 at 1:09 PM, Igor Lautar <igor.lautar@gmail.com> wrote:
Show 41 quoted lines
> Hi All,
>
> I'm using git-svn to manage quite large svn repository. This
> repository also does not follow 'general' svn rules about how to name
> branches.
>
> So we have something like:
> trunk -> development
> branches\version1 -> version1 maintenance
> branches\custom\version1_fix -> customized version1 with certain fixes
>
> etc.
>
> When importing, I've only imported trunk and branches I'm interested
> in. Thus, I have multiple remotes for which git-svn does not know they
> are related (or how they branched from each other). Also, I have not
> imported whole history, as its just to much trouble.
>
> Now, I want to start a new branch, lets say branches\dev1, which is
> branches from trunk. This will be used for various improvements, which
> do not go to trunk immediatelly.
> I also want to keep this branch in sync with main trunk.
>
> Up to now, I have been doing this by git-cherry-pick all changes from
> dev1 branch point. Is there a better way to do? Note that branch dev1
> in git-svn does not know about previous commits in trunk (git remote
> ref was initialized from branch point for dev1).
>
> Just merging trunk (represented by a remote in git-svn) makes a mess
> (as expected). Basically, what I want to do is tell git-svn that merge
> was already done up to a certain point from that branch so git-merge
> then only picks up new changes from that point on (and the ones that
> have not been cherry-picked).
>
> Is there a way to get out of this mess? I'm fine with cherry-pick, but
> it requires some manual labor (like remembering/finding last
> cherry-picked commit).
>
> Thank you,
> Igor
>
Previous: Igor Lautar
Message 2 of 2 in “git-svn multiple branches and merging”
  1. Igor LautarMar 2, 2009
  2. Igor LautarMar 12, 2009

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.