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

AW: Moving commits from one branch to another

From
SSStefan Schulze <algroth@gmx.de>
Date
Jan 23, 2013, 14:13 UTC
Message-ID
<000b01cdf973$cc685fc0$65391f40$@de>
In-Reply-To
<20130123121203.GM7498@serenity.lan>
Show 7 quoted lines
> > Is there any way to move/copy commits from one branch to another
> > without a common base-commit and without a forced push of master?
>
> Did you try "git rebase" with "--onto"?  You probably want something
> like this:
> 
>     git rebase --onto svnbranch publishedToSvn master

I already tried this some days ago, but wasn't sure about the result. The resulting history looks exactly what I expected, but all the commits are on master after executing this commands and svnbranch only contains the original two commits (svn-commit creating the root directory and the cherry-picked commit from master)

Does the current branch matter if I call git-rebase with the <branch>-argument?

Previous: John KeepingNext: John Keeping
Message 3 of 5 in “Moving commits from one branch to another”
  1. Stefan SchulzeJan 23, 2013
  2. John KeepingJan 23, 2013
  3. AW: Moving commits from one branch to anotherStefan Schulze, Jan 23, 2013
  4. John KeepingJan 23, 2013
  5. AW: Moving commits from one branch to anotherSchulze, Stefan, Jan 23, 2013

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.