Skip to content

Support revert bump or commit #251

Closed
@woile

Description

@woile

Description

So the idea is to be able to undo a bump + changelog just made or commit.

This can be either a command or just documentation (doesn't need to be part of the code).
For example, in my use case I usually forget to add --changelog or sometimes I forgot something.

This command is intended for local usage. Specially if you manually execute cz bump --changelog

Possible Solution

The code to revert a bump for example is:

for a bump:

git tag --delete <created_tag>
git reset HEAD~
git reset --hard HEAD  # or git checkout -f

for a commit:

git reset HEAD~

Additional context

In case we go for a command I see something like this:

cz undo --bump
cz undo --commit

I'd avoid revert because it has a different meaning in git. Which is adding a new commit reverting the previous one.

Opinions? Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions