Bulk Reverting Commits



Published: 2018-04-11 13:59:44 +0000
Categories: Git,

Language

Git

Description

Usually, you only want to revert a single commit at once. Just occasionally, though, you want to revert multiple commits all in one fell swoop (making it either a very sad or a very happy day).

Snippet

git revert --no-commit [commit ref1]
git revert --no-commit [commit ref2]
git revert --no-commit [commit ref3]
git commit -m "Ripping out those rubbish changes"

Usage Example

git revert --no-commit c793d776
git revert --no-commit 81e71c8c
git revert --no-commit 8ca16d12
git revert --no-commit f698c756
git commit

Keywords

revert, commit, batch, bulk,

Latest Posts


Copyright © 2019 Ben Tasker | Sitemap | Privacy Policy
Available at snippets.bentasker.co.uk, yr4pnhounvdybotb.onion and snippets.6zdgh5a5e6zpchdz.onion