Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Push tags with Xcode 9

From cli I push tags like this

git tag 1.0.1 && git push origin 1.0.1

From Xcode 9 I can tag commits. But, how do I push that tag to origin from Xcode?

like image 820
joels Avatar asked Sep 09 '17 00:09

joels


People also ask

How do I add tags in Xcode?

To add a tag to a folder or file in the project In the On-Demand Resources Tags field, type the name of the tag. Xcode uses name completion as you type characters. Accept the tag name by pressing the Return key.

Does Git push include tags?

git push <remote> --tags will push both lightweight and annotated tags. There is currently no option to push only lightweight tags, but if you use git push <remote> --follow-tags only annotated tags will be pushed to the remote.

How do I add tags to a commit?

In order to create a Git tag for a specific commit, use the β€œgit tag” command with the tag name and the commit SHA for the tag to be created. If you want to create an annotated tag for a specific commit, you can use the β€œ-a” and β€œ-m” options we described in the previous section.


1 Answers

As of Xcode 10.0 beta (10L176w) (released 2018-06-04, coincident with WWDC18), we can now optionally push tags to the remote during normal push actions. (Source Control -> Push...) There does not, however, appear to be a mechanism to selectively push tags.

Xcode 10 Tag Pushing


Historical Info

As of Xcode 9.1 (9B55), this is currently impossible. I'm certain it will be fixed in an update (though it doesn't exist in Xcode 9.2b2).

As an aside, if you have made several tags and want to push all of them to the remote from the command-line, you can do git push origin --tags.

Update 2018-04: pushing tags still unimplemented as of Xcode 9.3 (9E145)

Update 2018-05: unimplemented as of Xcode 9.4 (9F1027a)

To my further surprise, setting git config --global push.followTags true, which causes all reachable and annotated tags to be pushed when performing git push, has no effect from within Xcode. (Info on push.followTags)

Update 2018-06: The release notes for today's Xcode 10 beta include this quite satisfying entry:

Tags can optionally be pushed from the push sheet. (40141815)

😊

I'm downloading it now and will confirm once it is installed.

like image 129
Matt Lewin Avatar answered Oct 05 '22 08:10

Matt Lewin