Merging a feature branch that is based off another feature branch : <p>A few days ago I had a <code>master</code> branch with a completely linear history. Then I created a feature branch, which we'll call <code>feat/feature-a</code>. I worked on that branch, then submitted it for code review to be merged into <code>master</code>.</p>

<p>While <code>feat/feature-a</code> was being reviewed, I wanted to work on another feature that relied on some code introduced by <code>feat/feature-a</code>. So I created a <code>feat/feature-b</code> branch from the <code>feat/feature-a</code> branch.</p>

<p>While I was working on <code>feat/feature-b</code>, <code>feat/feature-a</code> got merged into master. So now master has the code introduced by <code>feat/feature-a</code>. I now want to merge <code>feat/feature-b</code> into master, but I get a lot of merge conflicts that look like this:</p>

<pre><code>&lt;&lt;&lt;&lt;&lt;&lt;&lt; HEAD
=======
    // Some code that was introduced by feat/feature-b
&gt;&gt;&gt;&gt;&gt;&gt;&gt; c948094... My commit message from feat/feature-b
</code></pre>

<p>My guess is that because I took <code>feat/feature-a</code> changes into my <code>feat/feature-b</code> branch, I'm now trying to "duplicate" those changes which is ending in merge conflicts.</p>

<p>I can resolve these manually, but they exist multiple times over tens of files, so I'd like to know a better solution if there is one.</p>
