How do I configure Git in Xcode to work with BitBu

2020-02-16 07:16发布

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

8条回答
Melony?
2楼-- · 2020-02-16 07:36

This link helped me, I will also copy and paste the instructions in case the link goes away.

http://sketchytech.blogspot.com/2016/02/send-xcode-project-to-bitbucket.html

Sending a non-git Xcode Project to BitBucket from GitHub is the most popular place to host your repos but if you are looking for a free service for teams that are 5 members or less then take a look at BitBucket. Here are instructions for moving a local Xcode project onto BitBucket. (Note: if you opted for a local Git when you created your project you should be able to skip steps 3 and 4.)

-Sign-up for BitBucket and create a repo

-In Xcode go to Source Control menu

-Select "Create a working copy ...."

-Select project and press Create in dialog window

-Return to Source Control menu and select -> Configure ...

-Click "Remotes" tab

-Press add "+"

-Copy and paste the https address you see at the top right of your repo page into the remote location in Xcode

-Go to Source Control menu and select Push... to upload the project

Pushing code updates to BitBucket Now you have it set up whenever you want to push code to the project:

-Go to Source Control menu and select Commit

-Write a commit note and uncheck anything not to be included in the commit

-Return to Source Control menu and select push

-Select the correct branch and Push

Pulling code down from BitBucket repo To get code provided by others down from BitBucket:

-Go to Source Control menu and select Pull.

查看更多
3楼-- · 2020-02-16 07:39

I found this youtube video and it helped me a lot, used this Atlasssian help for ssh authentication, and encountered an Xcode problem for which the solution can be found in this page.

查看更多
登录 后发表回答