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

Re: User's mailing list? And multiple cherry pick

From
David <wizzardx@gmail.com>
Date
Jun 4, 2008, 08:11 UTC
Message-ID
<18c1e6480806040111s606701dfwc8a2ae5f742307b5@mail.gmail.com>
In-Reply-To
<m3r6bdzm22.fsf@localhost.localdomain>
Show 8 quoted lines
> There is Git User's mailing list ("Git for human beings", heh)
>  git-users@googlegroups.com
>  http://groups.google.com/group/git-users
>  nntp://news.gmane.org/gmane.comp.version-control.git.user
>
> There is GitFaq at Git Wiki:
>  http://git.or.cz/gitwiki/GitFaq
>
Thanks for the links.
Show 7 quoted lines
>> Is there an easier syntax for doing this?
>
>  $ git rebase --onto
>  $ git rebase --onto --interactive
>
> (if you want to copy, just create new branch using "git branch", or
> something).

Thanks, but this doesn't quite solve the problem. I'm on the verge of figuring it out, and would appreciate any further tips :-)

Here is an example:
o--o--O master
       \
        o--o--X--X--X--X--o--o topic

I want to copy the "X" patches from the topic branch over to master. The other patches aren't appropriate for master for whatever reason. eg, temporary debugging hacks, but I fixed a few problems in master in the X patches and now want to apply them on top of master, and keep working on "topic"

I want to end up with a tree like this:
o--o--O--X'--X'--X'--X' master
       \
        o--o--X--X--X--X--o--o topic

After getting the branches like this, I would then (try to) rebase topic like this:

o--o--O--X'--X'--X'--X' master
                      \
                       o'--o'--o'--o' topic

I say try to, because rebase sometimes gets a lot of dumb (to me, maybe I'm not using git correctly) conflicts in cases like this, so I end up manually rebasing, by making a new topic branch off master, cherry picking into it off the old topic branch, and then removing the old branch. Another case where multiple cherry picks would be nice :-)

>
> Why can't you simply use merge, BTW?
Because the topic branch has some 'dirty' commits that I don't want in master.
David.
Previous: Jakub NarebskiNext: Jakub Narebski
Message 14 of 22 in “User's mailing list? And multiple cherry pick”
  1. DavidJun 4, 2008
  2. Junio C HamanoJun 4, 2008
  3. DavidJun 4, 2008
  4. Jakub NarebskiJun 4, 2008
  5. Johan HerlandJun 4, 2008
  6. DavidJun 4, 2008
  7. Wincent ColaiutaJun 4, 2008
  8. DavidJun 4, 2008
  9. Wincent ColaiutaJun 4, 2008
  10. Jakub NarebskiJun 4, 2008
  11. Björn SteinbrinkJun 4, 2008
  12. Johan HerlandJun 4, 2008
  13. Jakub NarebskiJun 4, 2008
  14. DavidJun 4, 2008
  15. Jakub NarebskiJun 4, 2008
  16. DavidJun 4, 2008
  17. Jakub NarebskiJun 4, 2008
  18. Theodore TsoJun 4, 2008
  19. Karl HasselströmJun 4, 2008
  20. Miklos VajnaJun 4, 2008
  21. Stephan BeyerJun 4, 2008
  22. DavidJun 4, 2008

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.