title: Why did my rebase not do anything?
body: <p>This project has only a <code>master</code> branch, so all work is being done there.</p>
  
  <p>I mistakenly committed a typo, and while I could commit an undo, I thought I'd try just removing the commit altogether.</p>
  
  <p>The commit hash is <code>dbcbf96b</code>, and <code>ded82215</code> is the commit right before it. So, working from <a href="https://stackoverflow.com/questions/37219/how-do-you-remove-a-specific-revision-in-the-git-history">these instructions</a>, I did this:</p>
  
  <ol>
  <li><code>git rebase -i ded82215</code></li>
  <li><p>This brought up the "todo" list in an editor, containing only the following, as expected:</p>
  
  <pre><code>pick dbcbf96 Writer update.
  </code></pre></li>
  <li><p>Presumably following the instructions in the comments of that generated file, I changed that line to:</p>
  
  <pre><code>drop dbcbf96 Writer update.
  </code></pre></li>
  <li><p>I saved the file and closed the editor. It then said:</p>
  
  <pre><code>Successfully rebased and updated refs/heads/master.
  </code></pre></li>
  <li><p>I then checked on GitLab (what I'm using to host this) expecting to see the commit gone, but it was not, it was still there.</p></li>
  <li><p>I did <code>git status</code> to see what action it recommended and it yielded:</p>
  
  <pre><code>On branch master
  Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded.
    (use "git pull" to update your local branch)
  nothing to commit, working tree clean
  </code></pre></li>
  <li><p>That kinda makes sense, but as for the rebase, I'm not sure what happened. Now I did <code>git pull</code> to update the local repo but it was all just right back where I started, right back at <code>dbcbf96b</code> with the local file still containing the change, the local repo up to date, and GitLab still showing the revision. The <code>pull</code> command yielded:</p>
  
  <pre><code>Updating ded8221..dbcbf96
  </code></pre></li>
  </ol>
  
  <p>So my rebase attempt did nothing at all. What did I miss here?</p>
  
  <hr>
  
  <p>So I tried <code>git push -f</code> between steps 4 and 5 as recommended by the answer below and it failed, yielding:</p>
  
  <pre><code>Total 0 (delta 0), reused 0 (delta 0)
  remote: GitLab: You are not allowed to force push code to a protected branch on this project.
  To https://gitlab.com/...
   ! [remote rejected] master -&gt; master (pre-receive hook declined)
  error: failed to push some refs to 'https://gitlab.com/...'
  </code></pre>
  
  <p>I then tried <code>git push</code> just for grins and it also failed, yielding:</p>
  
  <pre><code>To https://gitlab.com/...
   ! [rejected]        master -&gt; master (non-fast-forward)
  error: failed to push some refs to 'https://gitlab.com/...'
  hint: Updates were rejected because the tip of your current branch is behind
  hint: its remote counterpart. Integrate the remote changes (e.g.
  hint: 'git pull ...') before pushing again.
  hint: See the 'Note about fast-forwards' in 'git push --help' for details.
  </code></pre>
  
  <p>That kind of makes sense, too, I suppose that's what <code>-f</code> is for. The hints in the second bit again recommended <code>git pull</code>, which I already know isn't the right action here. </p>