title: Why does git (sometimes) clone a commit when merging?
body: <p>I'm aware that there are some scenarios that lead to Git commits being duplicated, for example a <code>git cherry-pick</code>. If a commit is cherry-picked and "merged" into another branch, it appears twice in the commit graph, with two commit hashes.</p>
  
  <p>Is it possible that Git duplicates a commit during a <code>git merge</code> operation?</p>
  
  <p>The reason I'm asking is the following commit graph (generated in TortoiseGit):</p>
  
  <p><img src="https://i.stack.imgur.com/bTVXP.png" alt="enter image description here"></p>
  
  <p>The commits are listed in 'date-order' here (author date).</p>
  
  <p>After I committed <code>efb916..</code> in the green branch (which was my <code>master</code> branch then), I merged the green branch into the red branch (which is a local side branch). This appears as a regular merge in the graph. So far so good.</p>
  
  <p>After that, I clicked the Sync button in Github for Windows to sync my local <code>master</code> to the remote <code>origin/master</code>. This pulled the commit <code>09067c..</code> from the remote branch and then merged or rebased the local <code>master</code>, so commit <code>09067c..</code> was followed by commit <code>efb916..</code>. However, instead of <strong>really merging</strong> <code>efb916..</code> onto <code>09067c..</code>, Git duplicated commit <code>efb916..</code> and gave the duplicate the new hash <code>48e314..</code>.</p>
  
  <p>In the end, my <code>master</code> pointed at <code>48e314..</code> (the black branch in the graph) and my local side branch pointed at <code>68b78a..</code> (the red branch). The contents, date, author and message of the commits <code>efb916..</code> and <code>48e314..</code> are exactly the same.</p>
  
  <p>This has happened several times, sometimes with just one commit being duplicated, sometimes with several commits.</p>
  
  <p><strong>Why did git duplicate the commit <code>efb916..</code>? How can I prevent it?</strong></p>
  
  <p><strong>EDIT:</strong> As an additional note: I find it strange that my <code>master</code> originally pointed at <code>efb916..</code>, but after the Github Sync <code>efb916..</code> was no longer in the commit history of <code>master</code>.</p>