Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I configure Git in Xcode to work with BitBucket

I have a project which I have been on for ages which is not connected to any source code repository.

I want to start using BitBucket now, however I am not sure how to go about it. I have created a project in BitBucket.

Should I now clone and check out in Xcode or should I add a repository in xcode. Anyone have any idea?

I have tried cloning using the URL from bitbucket but it just comes back with an error in Xcode

like image 834
TheLearner Avatar asked Mar 26 '12 10:03

TheLearner


People also ask

How do I add Bitbucket to Xcode 12?

In menu "Source Control" -> -> "Configure " In the new window, click on "Remotes" -> "+" -> "Add Remote" Name: anything (you can use "BitBucket")


1 Answers

I've met the same problem and here's how I solved it:

  1. (Assume your project is not already under local source control) Create a new project under LOCAL source control (Please note that adding remote source control at this stage may not be successful)

  2. Make this new project a clone of your old project - drag files, add frameworks, etc.

  3. In menu "Source Control" -> -> "Configure " In the new window, click on "Remotes" -> "+" -> "Add Remote"

    • Name: anything (you can use "BitBucket")

    • Address: https://[email protected]/accountname/reponame.git

  4. "Source Control" -> "Commit"

  5. Select "push to remote" at the left bottom corner

  6. Click "Commit"

  7. Check on BitBucket website to see if it's actually pushed to it

like image 117
AsyncMoksha Avatar answered Sep 22 '22 02:09

AsyncMoksha