Registered Account:
- Please register http://git.oschina.net first.
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/Local make
Installation
sudo make install
Configure git and connect to [email protected]
See Louzo's blog Xcode connection [email protected] step one to fourth.
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]:justben< /c4>/jbcalendar.git Add the remote repository alias git Add. " Commit Jbcalendar " Add all modify the repository Git pull Origin master gets and merges from the remote library to the local repository Git push origin master pushes the modifications to the remote library
- So far, the new project has been completed.
Update Project
Similar to actions when creating a project, open command-line tools, execute commands
CD gitoschina/jbcalendar/ into the project directory git Add. " Commit Jbcalendar " Add all modify the repository Git pull Origin master gets and merges from the remote library to the local repository Git push origin master pushes the modifications to the remote library
- This completes the update.
Summary of Errors
1. Error :
from remote Repository. Please make sure the correct access rights and the repository exists.
Workaround:
重新设置SSH
CD CD~/.ssh/SSH-keygen generating Public/PrivateRSA key pair. Enter fileinchWhich to save the key (/users/yongbin/.ssh/Id_rsa):/users/yongbin/.ssh/Id_rsa already exists. Overwrite (y/n)?y Enter Passphrase (empty forno passphrase): Enter same passphrase Again:your identification has been savedinch/users/yongbin/.ssh/Id_rsa. Your PublicKey has been savedinch/users/yongbin/.ssh/id_rsa.pub. The key fingerprint is: F8: the: A4: -:Panax Notoginseng: 7C:BF: -: b1:4f:d5:e1: -: About: -: 9e [email protected] the key's Randomart image is:+--[RSA2048]----+ | . | | . + | | e..| | O ... o| | O S .... +| | B +. o o.| | . O. = . | | . O + | | . . | +-----------------+Cat Id_rsa.pub|pbcopy Add an ssh to the git.oschina.net and copy it directly into the CD~/oschina/jbcalendar/go to the project directory git Add. git commit-a-m"xxxxxxxxxxxxxx"git pull Origin master Git push Origin master
IOS: Using the command line to host code on Oschina