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

Re: switching upstream tips

From
Ittay Dror <ittay.dror@gmail.com>
Date
May 13, 2009, 08:32 UTC
Message-ID
<4A0A858C.2070808@gmail.com>
In-Reply-To
<81b0412b0905130115v78b5065bjdeb3f349072eed4c@mail.gmail.com>
Alex Riesen wrote:
Show 11 quoted lines
> 2009/5/13 Ittay Dror <ittay.dror@gmail.com>:
>   
>> tried git rebase, this is what i get:
>> git rebase -i upstream master
>> fatal: Needed a single revision
>> Invalid base
>>     
>
> $ git checkout my-old-master-based-on-old-upstream
> $ git rebase -i old-upstream
>   

so i need to create an 'old-upstream' branch first, that is based on the tip of the old-upstream remote, right? how? (thanks for the patience)

Show 19 quoted lines
>   
>>> Ok, that simplifies everything. Just cherry-pick (see "git cherry-pick")
>>> your commits on new upstream. You might find it easiest if you cherry-pick
>>> them on commits in new upstream which correspond the old-upstream
>>> exactly.
>>>       
>> can you explain a bit more how to work with git cherry-pick? if i understand
>> correctly, i need to write down my commits, switch to the new upstream tip
>> ('git checkout upstream master'?) and then call git cherry-pick for each of
>> my commits.
>>     
>
> $ gitk old-upstream-with-my-changes-on-top &
> $ git checkout -b my-new-master-on-top-of-new-upstream  new-upstream
> ...select a commit in gitk...
> $ git cherry-pick <paste-the-selected-commit-here> # hit Enter
>
> repeat until you run out of commits you want to have on top of the new upstream.
>   
Previous: Alex RiesenNext: Alex Riesen
Message 11 of 12 in “switching upstream tips”
  1. Ittay DrorMay 13, 2009
  2. Alex RiesenMay 13, 2009
  3. Ittay DrorMay 13, 2009
  4. Alex RiesenMay 13, 2009
  5. Ittay DrorMay 13, 2009
  6. Johannes SixtMay 13, 2009
  7. Ittay DrorMay 13, 2009
  8. Johannes SixtMay 13, 2009
  9. Alex RiesenMay 13, 2009
  10. Alex RiesenMay 13, 2009
  11. Ittay DrorMay 13, 2009
  12. Alex RiesenMay 13, 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.