iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
👻

How to recover after finishing a git-flow release before syncing branches

に公開

If you worked without updating develop and main to the latest versions, and the release commit does not end up on the release branch, here is how to revert the state.

# sync (reset) origin main
git switch main
git reset --hard origin/main

# sync (reset) origin develop
git switch develop
git reset --hard origin/develop

# remove git tag
# 1) check the tag name to be removed
git tag
# 2) remove
git tag -d xxx

Discussion