Understanding Git with Xcode and BitBucket

After several tutorial lessons, I was finally able to take my existing project -Repository XCode and upload it to the BitBucket repository. I am completely new to git, but I would like to start working with versions. Since I'm a complete newb, I would prefer not to work with the command line all day (this is what I needed to do to get the project on BitBucket).

The Xcode organizer now has access to the BitBucket repository. I successfully cloned the project back to my hard drive. My question is: will the projects now synchronize with each other? I am not familiar with the jargon and the difference between a branch and a fork. Essentially, I downloaded the 1.0 codebase, and I want to start working on 1.1. I would like to either fork the code or fork it so that the original project remains for reference. From what it appears when I clone my hard drive, Xcode creates a new local repository instead of saving it to BitBucket.

I am confused, please help!

+6
source share
2 answers

Viking is a server-side operation where you clone a repo. For BitBucket, it is usually used with Mercurial (see " " Creating the Bitbucket Repository ").
This is not what you did.

You just cloned your Git repo beatbox ( now that BitBucket also supports Git , not just SVN and Mercurial) into a local repo and import it into your Xcode editor.
You can verify this through the command line ( git remote ) or in Xcode (see Version Control System with Xcode 4 and Git ").

Please note that you need to use the https address for your BitBucket clone site in order to be able to return to the repo from BitBucket from the local repository of your Xcode: see " Bitbucket + Xcode 4.2 + Git ".

In more detail based on Git (especially branches) you can first run small labs from gitimmersion.com .

+3
source

What you want to do is to separate your code from your "master", that is, your 1.0, to "development", i.e. your version 1.1. This is the easiest way to get used to version control. When you create a branch using Xcode, a project in Xcode that you work on locally will be on that branch.

When you make changes to the code in this thread, β€œcommit” them from Xcode, and then β€œPush” them to Bitbucket (everything is done from the same menu in the Xcode> Source Control> ... Xcode will ask if any branches for submitting changes, so make sure you select a development branch.

This will cause your local copy and remote repo to sync while developing your code.

This chapter in the Xcode user guide really helped me:

https://developer.apple.com/library/mac/#documentation/ToolsLanguages/Conceptual/Xcode4UserGuide/SCM/SCM.html

How often you have to do a fix and push the dance comes from experience.

Good luck.

+2
source

Source: https://habr.com/ru/post/903502/


All Articles