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

1 patch to two branches

From
Aallstars <allstars.chh@gmail.com>
Date
Mar 3, 2011, 12:46 UTC
Message-ID
<38ac3be3-8d09-4a38-b31e-9365fe0f2992@v11g2000prb.googlegroups.com>

hi my case is as follows I have two branches basically they are the same, except they differ from different package name(java) and namespace(cpp) due to customer request

but now I have a fix , say a patch I want to commit it to both branches

but I am lazy so I just want to do just one 'git commit' and 'git push'

so I am thinking using a githook in remote server and each commit to branch A can also commit to branch B as well

but I am not quite sure what I should use in the hook
git rebase , git merge or git cherry pick ?

seems these 3 ways all lead to the same result but I dont know which is better and why

thanks
Next: Neal Kreitzinger
Message 1 of 2 in “1 patch to two branches”
  1. allstarsMar 3, 2011
  2. Neal KreitzingerMar 7, 2011

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.