Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

1
  • 1
    This is the right (upvoted :-) ) answer, and the easiest way to deal with the situation. I will add one nuance (which I'm sure jthill knows and it's mostly irrelevant, so a comment makes a good footnote): the always here gets modified slightly when you use git commit --amend. The --amend option tells git commit to use, not the current (HEAD) commit, but rather the current commit's parent(s). That's how Git fakes the amending (which isn't actually changing anything, but instead is adding a new commit, as usual—well, almost as usual). Commented Oct 28, 2016 at 21:06