Environment Preparation:
- Xcode (direct AppStore download installation)
- Git (you can download git installer in http://code.google.com/p/git-osx-installer/, or in https://www.kernel.org/pub/software/scm/git/ Download the source installation. )
Source Installation process:
Unzip the source package
Tar xjvf git-1.8.3.tar.bz2
Compile
CD Git-1.8.3./configure--prefix=/usr/localmake
Installation
sudo make install
Configure git and connect to [email protected]
First step: genetic ssh secret key
Open Terminal, enter
Ssh-keygen-t rsa-c "[Email protected]"
Output text
Generating public/private RSA key pair. Enter file in which to save the key (/USERS/DIAOSI/.SSH/ID_RSA): Shiniv_test Enter the generated key file name above, such as shiniv_test, screen output: Enter Passphrase (empty for no passphrase): Enter password enter same passphrase again: Confirm Password Your identification have been saved in Diaosi. Your public key have been saved in Diaosi.pub.The key fingerprint is:25:fd:01:00:89:98:49:bf:2e:ac:32:2e:d2:5d:bf:98 [Emai L protected]the Key ' s randomart image is:+--[RSA 2048]----+|. + .. o ... | | +.. . . . || . . O. | | . O. . || . S. | | |.. | | | =.... O. | | *o E.. | +-----------------+
The screen prompts to generate the key file successfully, saved in the/users/shiniv folder.
Step two: Put Diaosi.pub Add the contents of [email protected] the SSH in the key
Address: Http://git.oschina.net/keys/new
Step three: Add SSH and connect
Input command: Ssh-add ~/.ssh
Enter passphrase For/users/shiniv/diaosi: enter password
Identity added:/users/shiniv/.ssh/(/users/shiniv/.ssh/)
Input command SSH-T [email protected], screen output:
The authenticity of host ' git.oschina.net (58.215.179.44) ' can ' t be established.
RSA key fingerprint is 14:B8:B8:0B:C2:B2:5E:AE:F2:21:F8:18:4D:3A:BE:FC.
Is you sure want to continue connecting (yes/no)? Yes (enter Yes), screen output:
warning:permanently added ' git.oschina.net,58.215.179.44 ' (RSA) to the list of known hosts.
Fourth step: Set up your personal information
Enter the command:
git config–global user.name "Shiniv" git config–global user.email [email protected]
Sync your project to [email protected]
- Under your git.oschina.net, create a project.
- On your computer, for future management convenience, you should set up a folder for Oschina project management, such as Gitoschina. Store each item in a secondary directory.
Open the command line tool and execute the command:
CD gitoschina/jbcalendar/ into the project directory git init initializes the local library (only needed for the first time) Git remote add origin [email protected]:shiniv/ Shiniv_test.git Adding an alias for a remote repository
- Set up files that need to be ignored, create a new. Gitignore in the project directory, and enter the following
#排除build目录build/* # Exclude temp nibs and swap files# excludes nib temporary files and swap files *~.nib*.swp# exclude OS X folder display Properties directory. ds_store# exclude Xcode3 Xcode 4 user-defined settings file *.mode1*.mode1v3*.mode2v3*.perspective*.perspectivev3*.pbxuserxcuserdata
Then continue to submit
git Add. Add all files to Repository git commit-a-M "First commit data" Add all Modify this repository Git pull Origin master get and merge from remote library to local repository Git push origin master Pushing changes to the remote library
- So far, the new project has been completed.
Update Project
1. Similar to the action when creating the project, open command line tool, execute command
CD xcode/iphone/ into the project directory git Add. Add all files to Repository git commit-a-M "Here is the submission instructions to fill in, must" add all modify the repository Git pull Origin master gets and merges from the remote library to the local repository Git push origin master pushing changes to the remote library
2. At this point, the update is complete.
Connect using Mac OS X terminal [email protected]