Timeline for How can I revert multiple Git commits?
Current License: CC BY-SA 4.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 14, 2022 at 19:49 | history | edited | Peter Mortensen | CC BY-SA 4.0 |
Used a more direct cross reference (as user names can change at any time). Removed the shell prompts to avoid confusion.
|
Feb 14, 2022 at 10:54 | history | edited | klutt | CC BY-SA 4.0 |
added 15 characters in body
|
Aug 7, 2019 at 3:24 | review | Suggested edits | |||
Aug 7, 2019 at 5:09 | |||||
Sep 29, 2018 at 0:09 | comment | added | Yoho |
Agree with @tessus, so the right thing to do would be: git revert --no-commit B^..HEAD or git revert --no-commit A..HEAD
|
|
Apr 28, 2018 at 3:50 | comment | added | tessus |
The range is wrong. It should be B^..HEAD , otherwise B is excluded.
|
|
May 10, 2016 at 16:44 | comment | added | Vadym Tyemirov | Agree with @Bogdan, the revert range is like that: SHA_TO_REVERT_TO..HEAD | |
Feb 22, 2016 at 16:42 | comment | added | Bogdan | Your solution worked fine for me, but with a slight modification. If we have this case Z -> A -> B -> C -> D -> HEAD and if I would want to return to the A state, then weirdly I would have to execute git revert --no-commit Z..HEAD | |
Jul 31, 2014 at 18:49 | history | answered | konyak | CC BY-SA 3.0 |