title: Commit history mess after squashing into master
body: <p>I have two branches in a repo: <code>master</code> and <code>dev</code>.</p>
  <p>State of <code>dev</code> is</p>
  <pre><code>- A - S1 - S2 - ... - SN - B - C
  </code></pre>
  <p>State of <code>master</code> is</p>
  <pre><code>- A - S
  </code></pre>
  <p>Where <code>S</code> commit is the result of &quot;squash and merge&quot; of <code>S1</code>, ..., <code>SN</code> from <code>dev</code> to <code>master</code>.</p>
  <p>Now, when I compare the branches, git shows a lot of changes, but actually they are <code>B</code> and <code>C</code>.</p>
  <ol>
  <li>What the best way to sync the branches?</li>
  <li>What the proper workflow to avoid such situations?</li>
  </ol>