Communities for your favorite technologies. Explore all Collectives
Now available on Stack Overflow for Teams! AI features where you work: search, IDE, and chat.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams
Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Get early access and see previews of new features.
Similar to Jakub's answerJakub's answer, this allows you to easily select consecutive commits to revert.
# revertRevert all commits from and including B to HEAD, inclusively $ git revert --no-commit B^..HEAD $ git commit -m 'message'
Similar to Jakub's answer, this allows you to easily select consecutive commits to revert.
# revert all commits from and including B to HEAD, inclusively $ git revert --no-commit B^..HEAD $ git commit -m 'message'
# Revert all commits from and including B to HEAD, inclusively git revert --no-commit B^..HEAD git commit -m 'message'
# revert all commits from and including B to HEAD, inclusively $ git revert --no-commit BB^..HEAD $ git commit -m 'message'
# revert all commits from B to HEAD, inclusively $ git revert --no-commit B..HEAD $ git commit -m 'message'