Git, Bitbucket are the tools that allow developers to store their code on the server as repositories and push/commit any changed made to the local machine code in to the repository code. The advantage of doing this is that if another developer is not working on the same machine then and is in a remote location, then he/she can carry on from where another guy left without even sharif multiple copies of code.
In this post, we will learn about Bitbucket and how we can use it with Xcode. The requirement for this is that you have an account on Bitbucket. If one did not have an account, then you can create it here
After creating your account, you have to create a team (optional) as shown below
After creating a team, you have to create a repository, give a name for the repository, description and select language for it. After creating it, you will see a screen like shown below
We are going to install git on our Mac machine using command line tool. Open Terminal and initiate commands as shown below
This will install empty git repository on your machine. If you are getting error, then please install command line tool from Xcode preferences option.
It’s time to get
Open Xcode and create a new project, we name it DemoProject. Save it inside your repository created earlier (in our case TestRepo).
Made some changes to your
Commit Steps:
- Click on Source Control.
- Click commit.
- Enter your comments.
- Click on Commit xx Files button.
Push Steps:
- Click on Source Control.
Push.Click
Go to BitBucket dashboard and you will see your code there.
Follow same steps, as listed above after making changes to files in order to push changes to server repository.
Commit Steps:
- Click on Source Control.
- Click commit.
- Enter your comments.
- Click on Commit xx Files button.
Push Steps:
- Click on Source Control.
Push.Click