Skip to main content

pre-commit plugin to improve default commit messages when reverting reverts

Project description


A tool for cleaning up reverted-revert git commit messages. It will turn

Revert "Revert "Experiment on the flux capacitor""

This reverts commit deadc0dedeadc0dedeadc0dedeadc0dedeadc0de.


Reinstate "Experiment on the flux capacitor"

This reverts commit deadc0dedeadc0dedeadc0dedeadc0dedeadc0de.
And reinstates commit 0d15ea5e0d15ea5e0d15ea5e0d15ea5e0d15ea5e.


As a git hook

The simplest way to use this package is as a plugin to pre-commit.

A sample configuration:

# Without default_stages, all hooks run in all stages, which means all your
# pre-commit hooks will run in prepare-commit-msg. This is almost certainly
# not what you want. This set will run for the default hooks installed, but
# you may have to adjust it for your environment.
  - commit
  - merge-commit
  # […]
  - repo:
    rev: v0.1.3
      - id: reinstate-revert-revert
          - prepare-commit-msg

By default, pre-commit does not install a hook for the prepare-commit-msg stage. You probably need to add it for this to work:

pre-commit install -t prepare-commit-msg

As a standalone script

pip install reinstate-revert-revert

See reinstate-revert-revert --help for a full set of options.

reinstate-revert-revert takes log message file names as positional arguments.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reinstate-revert-revert- (8.2 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page