title: How do I properly use git workflow with rebase?
body: <p>I am using <a href="https://bitbucket.org/" rel="nofollow">bitbucket</a> and am running into problems using the rebase feature of git. In short I need to reapply changes I already applied each time I rebase. I have recreated the problem using the steps below. Its a simplified version but the outcome was the same.</p>
  
  <ol>
  <li>Developer A creates a git repo and adds a <code>contributors.txt</code> to <code>master</code>, commits and pushes. Now <code>master</code> has a <code>contributors.txt</code> file. The contents of the file is 
  <code>
       Developer A
  </code></li>
  <li>Developer A creates <code>branch-a</code> from <code>master</code>.</li>
  <li>Developer B creates <code>branch-b</code> from <code>master</code>.</li>
  <li>Developer A appends the contributors file in <code>branch-a</code> so it looks like.
  <code>
       Developer A
       Developer A2
  </code></li>
  <li>Developer B appends the contributors file in <code>branch-b</code> so it looks like
  <code>
       Developer A
       Developer B
  </code></li>
  <li>Developer A commits and pushes the changes to remote <code>branch-a</code></li>
  <li>Developer B commits and pushes the changes to remote <code>branch-b</code>.</li>
  <li>Developer A merges <code>branch-a</code> with <code>master</code>.</li>
  <li>Developer B checks out master and pulls so the local master gets updated with the changes applied by the merge mentioned in step 8 above.</li>
  <li>Developer B checks out <code>branch-b</code> and does <code>git rebase master</code></li>
  <li>Developer B gets a merge conflict.</li>
  <li>Developer B fixes the merge conflict so the file now looks like
  <code>
       Developer A
       Developer A2
       Developer B
  </code></li>
  <li>Developer B does <code>git add</code> to add the fixed conflict and runs <code>git rebase --continue</code>. All goes well.</li>
  <li>Developer B pulls <code>branch-b</code> since now the local and remote <code>branch-b</code> has diverged they need to be merged. (Needs to set-upstream before pull)</li>
  <li>Developer B resolves merge conflict, now the local <code>branch-b</code> has the changes from master and can be pushed to remote.</li>
  <li>Developer B pushes <code>branch-b</code> to remote. using <code>git push origin branch-b</code>. All goes well.</li>
  <li>Developer B creates a new file in <code>branch-b</code> and commits.</li>
  <li>Developer B then does
  
  <ul>
  <li><code>git checkout master</code></li>
  <li><code>git pull</code> (master is up to date since it has not changed since last pull i.e. Step 9)</li>
  <li><code>git checkout branch-b</code></li>
  <li><code>git rebase master</code></li>
  </ul></li>
  <li>When <code>git rebase master</code> is executed, git asks developer B to resolve the same conflicts all over again. Why does this happen? Shouldn't the already applied changes be known and not asked to be applied again?</li>
  </ol>
  
  <p>I think I can use merge instead of rebase to overcome this problem. But it seems like I am using rebase incorrectly. Please let me know what I am doing wrong</p>