Use GitHub to manage iOS Distributed Project Development
In our iOS project development process, our team members are scattered and distributed, which brings challenges to project management. Git is a software capable of version management. It is the future of cvs and svn. Below I will summarize some experiences based on our experience as follows:
1. Create a github account
2. Create a code repository
3. Add a project in xcode to github.
4. Create an organization and a team
5. clone projects for other players
Create a github account
You can build a git server based on your own needs, of course, you can also use github (https://github.com/) open source community to provide servers, where there is free m space to use, however, projects can only be shared. Private projects require payment. Go to https://github.com/plansto register your githubaccount number.
To secure your computer's access to the github server, you need to provide SSH digital encryption for your computer. For details, refer to http://help.github.com/mac-set-up-git/to generate a Public License. Click <Your account> Edit Your Profile> SSH key> Add SSH Key.
Copy the public key file to the key text box using vi.
Create a code repository
If you are the Project Administrator, you need to create a code repository for your project. Enter https://github.com/repositories/newto create the code repository.
Add a project in xcode to github
In git technology, a local code repository is also required to maintain the consistency of the remote git server code repository. Even if a project is not developed by a team, a local code repository should also be created, this allows you to easily manage software code. The easiest way is to select version control when creating a project, and select the following when creating a project:
To connect to a remote code repository, you need to make some configuration. Enter the following command on the mac terminal:
$ Git config -- global user. name "your username" Note: it may not be your account
$ Git config -- global user. email "your email" NOTE: registered account
$ Cd HelloWorld Note: The created project directory
$ Git init
$ Touch README
$ Git add README
$ Git commit-m'first commit'
$ Git remote add origin git@github.com: <your account>/HelloWorld. git
$ Git push-u origin master
If the git client software on your mac is not installed, you can download and install it at the following address. Bytes.
After the command is executed on the terminal, return to xcode to ensure that all the code has been commit. Then, in the Select menu: File-> Source Control-> push, the dialog box is displayed.
Click the Push button to Push your project to the remote code repository. Then you can see the changes on github.
Create an organization and team
Your account can access this remote code repository, but this is not enough for your team to access this remote code repository. First, you need to create an organization in github and click <Your account>-> Edit Your Profile-> Organizations-> create new organization. Enter the Organization Name and organization email.
After you return to the Profile, you can see the organization you created.
Select organization> Members> team management from Profile.
Go to the Team management screen and click "New Team" to go to the Team Creation screen.
In name, enter the team name, and in the Members project, enter the user account that has been registered on github, which will be automatically recognized. Select "Push & Pull" in This team grants project so that other team members can Push their projects. In the Repositories project, select the remote code repository name. Click Save Team.
Other member clone Projects
You have added other team members. They also need to go to github to set up. Log on to github and select the Switch account context drop-down box ,.
Select the organization name to go to the Organization screen and select the team name to go to the team screen.
Select the Administrator account in the team screen to go to the Administrator screen.
In this way, you can see the Administrator code repository under your account.
Select the desired code repository and click Fork.
A dialog box is displayed.
Click Fork... The snapshot of the test code repository is added to your account.
After completing these preparations, you can clone the test remote code repository to the local machine using other accounts of the team members. Open xcode and select Connect to repository on the startup screen.
Enter the git@github.com in the following figure: guandongsheng/test. git
If you can connect to github, the Next button can be clicked to start cloning.
If everything goes well, a success screen is displayed.
GitHub Tutorials:
Create a personal technical blog via GitHub
GitHub tutorials
Git tag management details
Git branch management
Git remote repository details
Git local Repository (Repository) Details
Git server setup and Client installation
Git Overview
Share practical GitHub tutorials
GitHub details: click here
GitHub: click here
This article permanently updates the link address: