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*

2
  • Will this preserve the previous commit messages? Commented Nov 29, 2018 at 21:14
  • 1
    @not2qubit no this will not preserve the previous commit messages, instead of commit #1, commit #2, commit #3, you'll get all of the changes in those commits packed into a single commit #1. Commit #1 will be the <root> commit you reset back to. git commit --amend --no-edit will commit all changes to the current commit which is <root> without needing to edit the commit message. Commented Nov 30, 2018 at 10:26