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

git push --follow-tags #43

Closed
jmendiara opened this issue Nov 20, 2015 · 3 comments
Closed

git push --follow-tags #43

jmendiara opened this issue Nov 20, 2015 · 3 comments

Comments

@jmendiara
Copy link

Have you consider using git v1.8.3 git push --follow-tags instead of git push && git push --tags ?

As the tag is annotated, this will prevent for uploading developer unannotated custom tags

--follow-tags

Push all the refs that would be pushed without this option, and also push
annotated tags in refs/tags that are missing from the remote but are pointing
at commit-ish that are reachable from the refs being pushed. This can also
be specified with configuration variable push.followTags. For more information,
see push.followTags in git-config[1].

@webpro
Copy link
Collaborator

webpro commented Nov 20, 2015

That's very interesting, @jmendiara, didn't know about this option. Will definitely try this out soon. Thanks!

@doliver3
Copy link

doliver3 commented Aug 1, 2016

First, thanks for making a great release tool.

Could you implement this --follow-tags option by default instead of git push --tags
git push --tags sends all of your local tags even if they are tags which are only pointing to your local repo that you have not committed to the server. It creates tag pollution from multiple users in the shared central repo, and some of those tags may not point to anything in the destination repo since the tag was only local.

Follow tags is much better since it only pushes tags that match your commits to the shared destination repo.
git push --follow-tags
That won't push all the local tags though, only the one referenced by commits which are pushed with the git push.

In case you don't like the --follow-tags option for some reason, git push with the specific tag name is also quite valid and is perhaps what is intended when you're running the release-it command. This also avoids tag pollution on the server from multiple users since only one tag is pushed rather than all of the tags from the local repo.

@webpro
Copy link
Collaborator

webpro commented Aug 1, 2016

Thanks for the report and explanation. I've released this change as a bugfix release in v2.4.1.

@webpro webpro closed this as completed Aug 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants