★ wanayoo — archive 1999 https://github.com/commitizen-tools/commitizen/issues/251Nouvelle recherche | Portail wanayoo
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support revert bump or commit #251

Open
Woile opened this issue Aug 18, 2020 · 4 comments
Open

Support revert bump or commit #251

Woile opened this issue Aug 18, 2020 · 4 comments
Labels

Comments

@Woile
Copy link
Member

@Woile Woile commented Aug 18, 2020

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?

@Woile Woile added the feature label Aug 18, 2020
@Lee-W
Copy link
Member

@Lee-W Lee-W commented Aug 20, 2020

Do you mean cz undo --bump and cz undo --commit? I'm neutral about this feature.

@Woile
Copy link
Member Author

@Woile Woile commented Aug 20, 2020

Yes, updated, thanks.

It could also be just a revert for a bump, like cz bump --undo.

@Sirius207
Copy link

@Sirius207 Sirius207 commented Aug 30, 2020

I would like to take this issue 👍

@Lee-W

@Lee-W
Copy link
Member

@Lee-W Lee-W commented Aug 30, 2020

Sure 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.