Search code examples
xcodegitgit-pushgit-tagxcode9-beta

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?


Solution

  • 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.