0

I have attributed a tag called origin/v0.4.9 for a specific commit on a GitHub Pull Request. I thought the PR was simple, stable, and "a certainty" to be merged really fast. I was wrong.

I ended up extending the Pull Request - so the tag was kind of "deprecated" and stuck in the past. To make things worse, the PR was merged to main branch.

Now, I want to associate the same tag (which uses the project notation) to a different commit.

Locally, in Magit (via Emacs) I deleted it (ok), on GitHub I successfully deleted it, and I tried adding a tag with the same on another commit, the latest one. It worked out locally. But, I can't push the addition. The mini-buffer returns:

tag 'origin/v0.4.9' already exists

How do I fix this?

3
  • 1
    Force pushing commits to the main branch (when others also push to that branch) is a very bad practice. Can you see why? Commented Jan 2, 2023 at 8:35
  • 1
    Yeah... I will avoid doing that again. It can be especially dangerous if they pulled stuff and started working on it locally Commented Jan 2, 2023 at 13:48
  • 1
    Actually it's worse than that. Say that you have pulled from the master branch and, in the meantime, someone else pushed to that same branch. By force pushing your changes, you're erasing possible changes that were pushed between the moment you pulled and the moment you force pushed. Commented Jan 2, 2023 at 14:20

1 Answer 1

0

For it to work out it was necessary to force push the tags!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.