-
Notifications
You must be signed in to change notification settings - Fork 74
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
Undo accidental commit messages. #232
Comments
if the commit is still in a branch that is not a release branch (latest or pre-release, etc), you would need to amend the commit message so that the breaking change is no longer in the history that ends up getting analyzed once the contribution is merged to a release branch. if it has already been merged to a release branch, it is too late to make an adjustment for since semantic-release will create a release as soon as it runs for that branch. |
I checked https://docs.github.com/en/github/committing-changes-to-your-project/changing-a-commit-message, and I agree that it's easy amending the last commit message. However, the article says that for older commits a force push is needed.
Do you still suggest to force pushing new commit messages? |
you should avoid rewriting the history of any of the release branches. however, branches that are not release branches should be safe to amend. in fact, it is recommended to rewrite the history of complicated branches significantly before merging to a release branch in order to tell an appropriate story in the generated release notes |
@travi is it in the docs somewhere? If not, can we add something in the docs saying that commits messages should be amended to 'cancel' a release type? |
So if someone does a
feat
commit and then aBREAKING CHANGE
commit, then there will be amajor
version.However, what if someone makes a commit that says
BREAKING CHANGE
, but then realizes that it's actually not a breaking change. How can they nullify the accidental commit message and make it aminor
change instead?The text was updated successfully, but these errors were encountered: