title: Do you see a big difference between squashing 2 commits or amending the first one?
body: <p>I'm curious how you would consider these 2 manners of cleaning a git history before pushing it (before the merge of a pull request. Is one of them making more sens than the other ?</p>
  
  <p>The question is not only technical but also 'conceptual' regarding the way it can modify the workflow in a development team.</p>
  
  <p>Say that :</p>
  
  <ul>
  <li>I have a commit A</li>
  <li>I pushed it to a dedicated branch meant to be used as a pull request</li>
  <li>I then add some code which "enhances" the first commit</li>
  </ul>
  
  <p>Solution 1 : Commit B, push &amp; share, then squash A &amp; B into A'</p>
  
  <p>Solution 2 : Amend the first one with <code>git add /path/to/thefile &amp;&amp; git commit --amend</code>, then <code>git push</code> with the <code>-f</code> option</p>
  
  <p>As far as I'm concerned, I <strong>think</strong> (but I'm not sure...) that there's technically no difference since the git history is rewritten and the commit signature/md5 will change. The only difference is that solution 1, when working in a team, helps in the pull request discussion by keeping the commits history until they are squashed into one.</p>