title: Squashing Commits to a single commit for a bitbucket pull request
body: <p>I'm trying to work on a version of git flow that can be used for a small team of developers to manage our development process, most of the employees are both new to git and bitbucket.  I have more experience with both but I'm by no means an expert.  We need a single commit for pull requests to upstream develop and the process I've worked out so far is as follows:</p>
  
  <p>Assuming an existing fork of a repository from upstream.  Also, note that I know that some of these commands can be combined but I'm also trying to teach the basics first.  This is how it's documented (more or less, I'm even more verbose in the actual documentation).</p>
  
  <pre><code># checkout
  $ git checkout develop
  
  # update
  $ git pull --rebase upstream develop 
  
  # Create topic branch
  $ git branch &lt;topic branch name&gt;
  
  # Checkout topic branch
  $ git checkout &lt;topic branch name&gt;
  </code></pre>
  
  <p>Do work</p>
  
  <pre><code># Add changes to index
  $ git add --all .
  
  # Commit changes
  $ git commit # and provide commit comment
  </code></pre>
  
  <p>Prepare for pull request, this branch is created so we can retain our commits before they were squashed, just in case the pull request is declined, or for whatever reason.</p>
  
  <pre><code># Branch the topic branch for a pull request
  $ git branch &lt;topic branch&gt;-pr 
  
  # Checkout the topic branch
  $ git checkout  &lt;topic branch&gt;-pr
  
  # Rebase to squash commits
  $ git rebase -i  # Rebase and provide a commit message
                   # for all of the commits that are squashed
  
  # Something like the following is shown
  pick 1fc6c95 do something  
  pick 6b2481b do something else  
  pick dd1475d changed some things  
  pick c619268 fixing typos  
  
  # Change the word pick to squash for all but the first line, for example:
  
  pick 1fc6c95 do something  
  squash 6b2481b do something else  
  squash dd1475d changed some things  
  squash c619268 fixing typos  
  </code></pre>
  
  <p>-> It's at this point, where I have a problem.  I can't seem to get down to one commit.  There are always at least two commits in this branch, I have seen the option to use --root but when I do that bitbucket complains that my pull request branch and the upstream branch are unrelated and I can't issue a pull request.</p>
  
  <pre><code># Push branch to origin
  $ git push origin &lt;topic-branch&gt;-pr 
  </code></pre>
  
  <p>I feel like I'm so close to having a working process, so any help would be greatly appreciated.</p>