title: how to git cherry-pick commit declaring our history contains it
body: <p>I did the following:</p>
  
  <pre><code>git fetch upstream
  git cherry-pick xyz
  </code></pre>
  
  <p>The picked commit had been applied cleanly except that in one of the files it had exactly the same changes I had already done in a previous commit so these changes were not reapplied.</p>
  
  <p>Everything in terms of code is fine but I'd like to have the commit hash in my history. In my history it appears with a new name. Is this even possible? As far as I'm reading the git merge "ours" strategy it seems to be generally possible but how to do it for a single commit?</p>
  
  <p>I want this so it is easier to identify later what commits does <code>upstream</code> has that I don't have. At the moment in github <code>network</code> view I see the cherry-picked commit as being something separate that I don't have.</p>
  
  <p>Additional information:
  What @CharlesB says makes sense to me. But how does <code>merge -s ours</code> do the magic then? In this case it was not important for me to <code>cherry-pick</code>. Because the change I wanted to take is only one and at the tip of the <code>upstream/master</code>. So just to try it out I did: <code>git merge -s ours upstream/master</code></p>
  
  <p>Now doing <code>git log --graph --pretty=oneline --abbrev-commit</code> I see something like:</p>
  
  <pre><code>*   9e8108b Merge remote-tracking branch 'mgencur/master' for better github netw
  |\  
  | * aa7117d Fix displaying watchers/watching for incorrect user // this commit magically appeared after merge -s ours
  * | ff05f8c Fix displaying watchers/watching for incorrect user // this is commit from cherry-pick of aa7117d
  * | b7ca8ec older commit in my fork
  * | &lt;more commits in my fork&gt;
  |/  
  * 94d6870 Fix obtaining available users for testing purposes
  * &lt;older commits of upstream/master&gt;
  </code></pre>
  
  <p>The same command <strong>before</strong> <code>git merge -s ours</code> was looking like:</p>
  
  <pre><code>* ff05f8c Fix displaying watchers/watching for incorrect user // this is commit from cherry-pick of aa7117d
  * b7ca8ec older commit in my fork
  * &lt;more commits in my fork&gt;
  * 94d6870 Fix obtaining available users for testing purposes
  * &lt;older commits of upstream/master&gt;
  </code></pre>
  
  <p>As you can see after cherry-picking of commit aa7117d, there was no indication that aa7117d is already applied to my fork repo. But after a merge it is indicated it is in there although nothing in my files changed.</p>
  
  <p>That makes me think that it is indeed possible to declare a number of commits included in a branch although they are not applied <strong>exactly</strong> as they were applied upstream.</p>
  
  <p>update2: I see question <a href="https://stackoverflow.com/questions/881092/how-to-merge-a-specific-commit-in-git">How to merge a specific commit in Git</a> and its best answer. So an explanation why it is not possible or it is not implemented would also be appreciated. </p>