简体   繁体   中英

GitHub / Sourcetree deleted tags are reappearing

At work we are using Sourcetree in combination with GitHub as source control solution of our code. In our respository we also created several tags and pushed them to the remote respository. However, some tags that were once created and removed afterwards, often reappear again in each developer's local repository (and also on the remote).

We already deleted the incorrect tags in each developer's local respository, and ade sure the checkbox ' Push all tags ' is disabled:

在此输入图像描述

However, the tags keep reappearing and we can not see which developer is responsible for this.

My question is, if there is a GIT command to see who pushed the tags from his local respository to the remote? Or is there another, permanent way to prevent deleted tags from reappearing?

There's no way to determine who pushed something by Git itself. However, since you mentioned GitHub, the Events API is available for retrieving recent changes for branch/tag. See the related question for details.

Removing tags is surely not a good workflow (they should be simple topic branch instead), but issuing a manual command to cleanup all clones should be good:

git tag -l | xargs git tag -d && git fetch -t

See How to REALLY remove a tag on git / SourceTree for details.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM