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, 07:49 UTC
Message-ID
<4A0A7BA1.4030500@gmail.com>
In-Reply-To
<81b0412b0905130041t327ef5f2m3b6d1dfac51fc1b1@mail.gmail.com>
Alex Riesen wrote:
Show 17 quoted lines
> 2009/5/13 Ittay Dror <ittay.dror@gmail.com>:
>   
>>> Alex Riesen wrote:
>>>       
>>>> * Reorder my history so that my commits are on top of the tip of the old
>>>> upstream repository.
>>>>         
>>> Look at "git rebase -i" (interactive rebase)
>>>       
>> well, i was hoping for something more automatic. git rebase will list all
>> commits without author, so i'll have to manually figure which of them is
>> mine from the commend and reorder
>>     
>
> git rebase will list only commits not on upstream (simplified).
> Has nothing to do with author being absent.
>   
tried git rebase, this is what i get:
 > git rebase -i upstream master
fatal: Needed a single revision
Invalid base
Show 25 quoted lines
>   
>>>> * Change the upstream repository reference so it points to the new
>>>> repository
>>>>         
>>> Just edit your .git/config and re-fetch.
>>>       
>> but then git suddenly sees a bunch of new objects (because of the svn
>> changes) and i get a lot of conflicts.
>>     
>
> "git fetch" and "git remote update" do not produce conflicts. You cannot
> get them unless you also do a merge (like when you do "git merge" or
> "git pull").
>
>   
>> note that it is not the directory structure that changed, just the svn
>> repository which is included in the commit comment (by git-svn) and
>> so changes the commit sha1.
>>     
>
> 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.

ittay
Previous: Alex RiesenNext: Johannes Sixt
Message 5 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.