Git merge commits selectively
<p>I have a question about Git that I've never had to do, so I would like to learn!</p>

<p>In my project I branched off <code>master</code> a while back; it is essentially a rewrite of the entire codebase, so let's call it <code>rewrite</code>. In the time that I have been working on <code>rewrite</code> I have also made and deployed some significant changes to <code>master</code>. Now that my rewrite is coming to a close, I want to bring it up to speed with all the changes made on master since I started the branch.</p>

<p>Usually I would do something like <code>git checkout rewrite &amp;&amp; git rebase master</code> and then solve the conflicts as they arise, but this time around  I can guarantee every commit with have a conflict since the codebase is entirely different.</p>

<p><strong>tl;dr</strong> What I am wondering is how I would go about taking each commit on <code>master</code> and one-by-one merging them into <code>rewrite</code>, so I could do it at my own pace and possibly out of order if need be.</p>