title: GIT - Rebase - How to deal with conflicts
body: <p>I am working on a project that has two branches: <code>master</code> and <code>feature</code></p>
  
  <p>The <code>feature</code> branch was created some time ago and has numerous commits.</p>
  
  <p>Since the <code>feature</code> branch was created there have been a couple of commits to <code>master</code></p>
  
  <p>At this point when I go to <code>rebase</code> off of <code>master</code> I get conflicts. I resolve them and then <code>rebase --continue</code>. Then I get conflicts again, and again resolve and <code>rebase --continue</code>. This happens over and over and many times it seems like they are the same conflicts that are appearing.</p>
  
  <p>In my mind here is what is happening:</p>
  
  <p><code>master(commits)-&gt;a-&gt;b</code>
  <code>feature(commits)-&gt;c-&gt;d-&gt;e-&gt;f-&gt;g</code></p>
  
  <p><code>feature</code> was branched from <code>master-&gt;a</code> and then all commits were created.</p>
  
  <p>When I <code>rebase</code> it rewinds back to the begining of <code>feature</code> where it was branched from <code>master</code> applies <code>master-&gt;b</code> and then starts to apply <code>feature-&gt;c</code> at this point it has a conflict. I resolve (accepting the <code>master</code> changes) and continue. Now it tries to apply <code>feature-&gt;d</code> and finds the same conflict. Again I have to resolve and <code>continue</code>. This happens over and over.</p>
  
  <p>For example here are the changes:</p>
  
  <pre><code>master-&gt;a
      &lt;div id="foo"&gt;
  
  master-&gt;b
      &lt;div id="bar"&gt;
  
  feature-&gt;c
      &lt;div id="fubar"&gt;
  
  feature-&gt;d
      //Nothing has changed, inherited from feature-&gt;c
      &lt;div id="fubar"&gt;
  </code></pre>
  
  <p>I am assuming that when it reaches <code>feature-&gt;c</code> it says change <code>foo</code> to <code>fubar</code> and then it notices that <code>foo</code> is already changed to <code>bar</code>. I resolve to <code>bar</code> and then it does the same logic applying <code>feature-&gt;d</code></p>
  
  <p>My two questions:</p>
  
  <p>1) Is my understanding of how git is working / dealing with commits/conflicts/rebasing correct?</p>
  
  <p>2) How can I avoid having to resolve the same conflicts over and over again? I was thinking of squashing all of the commits on the feature branch so that there is only one to deal with. I was not sure if this was a good idea or exactly the best way to go about squashing in the scenario. </p>
  
  <p>Note, this is a very simplified example. In reality I have a lot more commits and within each numerous files with numerous conflicts. Some of them appear to be the same throughout the <code>rebase --continue</code> process and some are new for each <code>commit</code>.</p>
  
  <p>My end goal is to clean up this project as simply as possible (get the feature branch rebased off the current master). I do not care about the history of the commits.</p>