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

git merge and cherry-pick and duplicated commits?

From
Sskillzero@gmail.com <skillzero@gmail.com>
Date
Jan 14, 2009, 02:40 UTC
Message-ID
<2729632a0901131840v5c7ce0c7l3f87c03caabf68de@mail.gmail.com>

I created a branch from master, did a commit (8e9fdd), then did 2 more commits (11c59c and 7024d), then did another commit (2daf23). From master, I did a commit (47bd1b) then cherry-pick'd 2 commits from the branch (11c59c and 7024d). When merged the branch into master, I see the 2 cherry-picked commits twice in the log (once from the original cherry-pick's and again from the merge).

I thought git would realize that master already had those 2 commits and not add them again when merging?

Next: Brian Gernhardt
Message 1 of 16 in “git merge and cherry-pick and duplicated commits?”
  1. skillzero@gmail.comJan 14, 2009
  2. Brian GernhardtJan 14, 2009
  3. skillzero@gmail.comJan 14, 2009
  4. Johannes SixtJan 14, 2009
  5. skillzero@gmail.comJan 14, 2009
  6. Johannes SixtJan 14, 2009
  7. skillzero@gmail.comJan 14, 2009
  8. Peter BaumannJan 14, 2009
  9. Junio C HamanoJan 14, 2009
  10. Markus HeidelbergJan 15, 2009
  11. Boaz HarroshJan 14, 2009
  12. Nanako ShiraishiJan 14, 2009
  13. Thomas RastJan 14, 2009
  14. Alex RiesenJan 14, 2009
  15. skillzero@gmail.comJan 14, 2009
  16. Sitaram ChamartyJan 14, 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.