Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It says:</p> <blockquote> <p>When you save and exit the editor, it will rewind you back to that last commit in that list and drop you on the command line with the following message:</p> </blockquote> <pre><code>$ git rebase -i HEAD~3 Stopped at 7482e0d... updated the gemspec to hopefully work better You can amend the commit now, with </code></pre> <p>It does not mean:</p> <blockquote> <p>type again <code>git rebase -i HEAD~3</code></p> </blockquote> <p>Try to <strong><em>not</em></strong> typing <code>git rebase -i HEAD~3</code> when exiting the editor, and it should work fine.<br> (otherwise, in your particular situation, a <code>git rebase -i --abort</code> might be needed to reset everything and allow you to try again)</p> <hr> <p>As <a href="https://stackoverflow.com/users/35189/dave-vogt">Dave Vogt</a> mentions in the comments, <code>git rebase --continue</code> is for going to the next task in the rebasing process, <em>after you've amended the first commit</em>.</p> <p>Also, <a href="https://stackoverflow.com/users/15842/gregg-lind">Gregg Lind</a> mentions in <a href="https://stackoverflow.com/questions/1884474/change-old-commit-message-on-git/3336459#3336459">his answer</a> the <strong><code>reword</code> command of <a href="http://git-scm.com/docs/git-rebase" rel="noreferrer"><code>git rebase</code></a></strong>:</p> <blockquote> <p>By replacing the command "pick" with the command "edit", you can tell <code>git rebase</code> to stop after applying that commit, so that you can edit the files and/or the commit message, amend the commit, and continue rebasing.</p> <p><strong>If you just want to edit the commit message for a commit, replace the command "<code>pick</code>" with the command "<code>reword</code>"</strong>, since <a href="http://www.cybersprocket.com/2010/project-management/sdlc/versions/git-version-1-6-6/" rel="noreferrer">Git1.6.6 (January 2010)</a>.</p> <p>It does the same thing ‘<code>edit</code>’ does during an interactive rebase, except <strong>it only lets you edit the commit message without returning control to the shell</strong>. This is extremely useful.<br> Currently if you want to clean up your commit messages you have to:</p> </blockquote> <pre><code>$ git rebase -i next </code></pre> <blockquote> <p>Then set all the commits to ‘edit’. Then on each one:</p> </blockquote> <pre><code># Change the message in your editor. $ git commit --amend $ git rebase --continue </code></pre> <blockquote> <p><strong>Using ‘<code>reword</code>’ instead of ‘<code>edit</code>’ lets you skip the <code>git-commit</code> and <code>git-rebase</code> calls</strong>.</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload