[IOS] Sourcetree+oschina Implementing code Remote Hosting

Source: Internet
Author: User
Tags email account sourcetree

in iOS development, when it comes to multi-person co-development, we have to use version control systems (git, for example) to merge and manage the code, and today we'll talk about versioning with Sourcetree+oschina
.
Let's start with some chicken soup: There are 2 versions of version control, git and svn, so what's the difference, simply put, GIT (distributed) SVN (centralized) what is centralized and what is distributed: look at the graph

Distributed benefits, that is, the current write code, submitted to the local warehouse, not afraid of loss, but also can do version of the record, if there is a day in the future to retrieve the code a few days ago, it is also possible. Then let's take a look at how to play! First step, install Sourcetree to plant one: http://pan.baidu.com/s/1sjWOn9b

Once opened, if it has expired, then register now directly registers it! (I skip here _)

If you see the following interface, it means that your source Tree installation is complete!

Step two go to Oschina application remote repository to link one: http://git.oschina.net


Then will give you the registration time mailbox, send a verification email, register

Then click on the link and it will jump to the homepage

If you are the project's founder (Little Red), then you click on Project (Create)
1. First step, create the project


2. The project was created successfully, such as

3. Because I created the private project (if it is a private project, do the following step, if not then skip the following step (step 3.x)) (3.1) Click on the top right corner to manage

(3.2) Click Add Project member, I here another (xiaoming) is [email protected]

Here's a little
bit about:
管理员: 最高权限开发者: 可以上传或者克隆(下载)代码  (一般给予这个权限)观察者: 只能下载, 无法上传报告者: 只能看, 和评论, 什么也不能干!
(3.3) Enter the other Oschina email account, and then give permission

back to the project homepage (note is the point of your project, for example I here is A1209woshi)

4. Get the cloned URL (for others to use, so that others can use this URL, the corresponding remote repository of things to Clone (download) to local)

What I'm getting here is https://git.oschina.net/women2323/a1209woshi.git.

5. Back to Sourcetree, create a new local warehouse

Fill in the cloned URL address
If it is the first time to use Soucetree (and is a private item), it will pop up to let you enter your Oschina account and password (small red)


6. Upload the project to the remote repository (for others (xiaoming) to download) (6.1) Find the Local warehouse folder (my on the desktop)

(6.2) then look at the workspace changes, and then put the non-staged file, put in the staging file area.


(6.3) Here's how Git works

(6.4) then commit (commit) to the local repository branch



(6.5) Develop a good habit, first pull from the remote repository, and then merge it locally, and then push back to the remote repository (that is, the merge code is done locally) (Note: If you do not pull, it is easy to put someone else just submitted the code, the top off)


(6.6) go back to the web to see, refresh, you will see the project I just passed

7. How other people pull this project, the HTTPS clone URL to him (if it is a private project, please make sure to add the other Oschina account to your project) (7.1) Similarly, from the URL cloning (new local warehouse)

(7.2) then fill in the Clone URL and select the Local warehouse location

(7.3) After entering into the workspace, because I am going to clone the code from the remote repository to local, so click Pull directly

(7.4) You will be surprised to find that the local warehouse, already has the remote warehouse thing!! (Write the code later, only need to perform the 6th step), so that you can easily and others to develop the team collaboration)

[IOS] Sourcetree+oschina Implementing code Remote Hosting

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.