Skip to content

Instantly share code, notes, and snippets.

@esweeney-cg
Last active June 1, 2023 20:04
Show Gist options
  • Save esweeney-cg/bd78fb5edae6c14c4c7c6b1cc23d17a1 to your computer and use it in GitHub Desktop.
Save esweeney-cg/bd78fb5edae6c14c4c7c6b1cc23d17a1 to your computer and use it in GitHub Desktop.
git revert

when reverting multiple commits from main where: A <- B <- C <- D and D is the most recent

git checkout -b my-revert-branch
git revert --no-commit D
git revert --no-commit C
git revert --no-commit B
git commit -a -m "my reverts"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment