title: Remove other peoples' commits on my branch after rebase gone wrong
body: <p>I got myself into some git-funk here. I need to git-fu myself out of this.</p>
  
  <p>I joined a new team and created a feature branch:</p>
  
  <p><code>git checkout -b feature_branch</code></p>
  
  <p>Made some changes and then committed/pushed them up to the branch.</p>
  
  <pre><code>git commit -am "Changes"
  git push origin feature_branch
  </code></pre>
  
  <p>Someone left a review on my PR, so I made the changes, and then checked out to master and rebased my branch before committing/pushing again to that branch:</p>
  
  <pre><code>// from feature_branch make some changes
  git commit -am "New changes"
  git checkout master
  git checkout feature_branch
  git rebase origin/master
  git push feature_branch
  </code></pre>
  
  <p>Once I did this, I noticed my PR (on Github) picked up someone elses' commit. I was then informed that the typical method within this new team is to checkout to master and merge back into my branch INSTEAD of rebasing.</p>
  
  <p>Here is the funky part now -- I started mucking around with <code>git reset --hard</code> and picked the commit I wanted that was before that commit from someone else.</p>
  
  <p>All was well, or so I thought. I then pushed that up and it seemed to have removed that other persons' commit from my PR.</p>
  
  <p>I checked this morning and now there are a bunch of other commits from someone else that got picked up.</p>
  
  <p>So now I'm in this weird state. I look at my PR and there are almost 30 commits (with 6 from different people). The actual diff (files changed) are only the files that I touched, which is good, but the history itself looks ridiculous.</p>
  
  <p>What's the best approach to clean this up? Everything is suggesting to use <code>git rebase</code>, however, I was advised not to use rebase.</p>
  
  <p>Unfortunately, I need to keep this branch. What's the best way to clean it up and remove all the other commits except only mine? Just reset it completely and then cherry-pick the changes back onto the branch? </p>
  
  <p>Please help :|</p>
  
  <p>EDIT: Here's an example of what the history looks like:</p>
  
  <pre><code>Commits on Jul 30, 2018
  &lt;SOMEONE ELSES&gt;
  
  Commits on Jul 31, 2018
  &lt;SOMEONE ELSES&gt;
  &lt;MY ORIGINAL COMMIT&gt;
  &lt;SOMEONE ELSES&gt;
  
  Commits on Aug 1, 2018
  &lt;SOMEONE ELSES&gt;
  &lt;MY COMMIT [Merge branch master into my feature branch]&gt;
  &lt;MY COMMIT&gt;
  &lt;SOMEONE ELSES&gt;
  &lt;MY COMMIT&gt;
  &lt;MY COMMIT&gt;
  &lt;SOMEONE ELSES&gt;
  &lt;MY COMMIT&gt;
  
  etc etc
  </code></pre>