Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to tag a Git repo from Xcode 4

It might be silly, but i just can't figure it out:

i added git support for my project after creating it, by closing Xcode and, from terminal:

$ git init
$ git commit -a -m "Initial commit"

When i reopen Xcode, it detects my local repository just fine, except for the fact that i just can't get how to create a tag. I can create a branch, but not a tag. How do you create one from Xcode?

EDIT: Did what @edc1591 suggested, and even created a project with Git support from scratch and i still don't see how to create a tag. There's only a Branch subfolder and the possibility to add one (branch), but nothing about tags...

like image 411
ferostar Avatar asked Apr 08 '11 16:04

ferostar


People also ask

How do I add tags in Xcode?

Three years after, Xcode 9 has been enhanced by tagging feature. Just go to Source Control navigator and tag any commit via context menu opened by rightclicking that specific commit.

How do I add a Git repo to Xcode?

Go to Source Control in Xcode and select Projectname -- master, then Configure... In the Address field, paste the Git clone URL for your repo copied in the previous step. Select Add Remote, then select Done to finish creating the origin remote for your local Git repo.

How do I add an existing remote to Xcode?

Add a connection to an existing remote repository in the Source Control navigator by Control-clicking the Remotes folder for your project and choosing Add Existing Remote. Provide a name and URL for the remote repository, and click Add to set up the connection.


1 Answers

Xcode 4 doesn't have a way to do a lot of SCM things, but it does cope with you doing most things via the command line (even while it is running). So if you want to make a tag make sure what you want tagged is committed and then do it like you would from the command line:

git tag -a -m "Mostly works" project_v0.2

On the plus side where Xcode 4 does SCM things, it does them pretty well. The "diff view" and blame view are both very useful, as are the status tags.

like image 135
Stripes Avatar answered Nov 15 '22 07:11

Stripes