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

Issues with deleting tags on repositories #15858

Open
Rekkonnect opened this issue Jan 3, 2023 · 6 comments
Open

Issues with deleting tags on repositories #15858

Rekkonnect opened this issue Jan 3, 2023 · 6 comments
Labels
bug Confirmed bugs or reports that are very likely to be bugs priority-3 Bugs that affect small number of users and/or relatively cosmetic in nature

Comments

@Rekkonnect
Copy link

The problem

a) Cannot delete an already pushed tag (GitHub on web allows you to)
b) Manually deleting the tag using commands does not properly update the existing tags. Trying to create another tag with the same name as the (now) deleted tag is prevented saying that the tag exists.

Release version

3.1.2

Operating system

Windows 10

Steps to reproduce the behavior

For both issues:

  1. Create a tag on a commit in a repo
  2. Push the changes to the origin, including the created tag

For issue a, you cannot delete the already pushed tag.

For issue b, follow those steps after the previous ones:

  1. Delete the tag on the remote repo, refetch local changes
  2. Delete the tag on the local repo, ensure that the tag no longer exists in the origin repo
  3. Select another commit, causing the information about the previous commit with the tag to update
  4. Attempt to create another tag on any commit, naming it the samea s the previously deleted tag.

The user will then be told that the tag exists, when it has been just deleted.

Log files

No response

Screenshots

No response

Additional context

No response

@steveward
Copy link
Member

Thanks for the report @Rekkonnect.

a) Cannot delete an already pushed tag (GitHub on web allows you to)

See this response for an explanation behind this behavior.

b) Manually deleting the tag using commands does not properly update the existing tags. Trying to create another tag with the same name as the (now) deleted tag is prevented saying that the tag exists.

I was able to reproduce this, but a restart of GitHub Desktop resolved the issue. I'll label this as a bug.

@steveward steveward added bug Confirmed bugs or reports that are very likely to be bugs priority-3 Bugs that affect small number of users and/or relatively cosmetic in nature labels Jan 9, 2023
@Seb33300
Copy link

Seb33300 commented Mar 29, 2023

I am facing the same issue with GitLab.

I removed an existing tag on GitLab.
Re created the same tag on another commit (also using GitLab UI).

But the tag is not updated on GitHub Desktop. Still showing on the previous commit.
Even if I restart it. Also tried to git reset to a previous commit and git pull again. But it did not help.

Any workaround to update it on GitHub Desktop? Any cache to clear?

@Seb33300
Copy link

Seb33300 commented Mar 29, 2023

I managed to solve my issue by manually running this command:

git fetch origin --tags --force

@gbakeman
Copy link

I would also like to see this implemented on the desktop app. Definitely warn us like when amending a commit, but allow us to continue at our own risk. This is turning out be especially important for me since I'm testing a workflow that depends on a tag being pushed to the repository.

@LiuAoran
Copy link

LiuAoran commented Nov 1, 2023

Thanks for the report @Rekkonnect.

See this response for an explanation behind this behavior.

I think we should not create difficulties for other people's work just because of developers' preferred behavior. We use git to manage projects that not only involve developers, but for non-technical personnel, it is unacceptable to use complex operations to solve operational errors. They get frustrated and panicked about it.

@AlisterH
Copy link

See this response for an explanation behind this behavior.

It is pretty much insane that github desktop allows me to create a tag easily without creating a "release", but doesn't let me delete a tag that has been pushed, when the web interface allows me to easily delete a tag but doesn't allow me to create a tag without creating a release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs priority-3 Bugs that affect small number of users and/or relatively cosmetic in nature
Projects
None yet
Development

No branches or pull requests

6 participants