Open Terminal:
View the git version of the terminal command:git-version
Input: SSH
Check to see if SSH already exists.
If it exists, first make an existing SSH backup, or build the new SSH into a different directory
If not present, SSH is generated directly from the default parameters
The build process is as follows:
SSH-KEYGEN-T rsa-c [email protected] (email when you register for GitHub)
Add SSH to GitHub (shown:)
Login to GitHub, select Account settings->ssh keys to add SSH
Title: Mailbox
Key: Open the Id_rsa.pub file you generated and copy the contents to this point.
Open the terminal, first test your account with GitHub does not have: ssh-t [email protected]
If a hint appears, you are already connected.
Next you can upload your code and build your own repository under GitHub. Create a new repository is as follows:
Repository name: Usually write the name of the project you want to create.
Description: That's your description of the project.
Select public
Click "Create resposity" to appear as:
Follow the steps above (remember to switch the directory to the project directory you want to pass through when typing in the terminal)
Touch README.MD//Create a new document for record submission operations
GIT init//Initialize local repository
git add readme.md//Add files or folders (need to use multiple times to add files on GitHub)
Git commit-m "First commit"//submit to the repository and write some comments.
git remote add origin [email protected]:[email protected] project name. Git//Connect to the remote repository and create an alias named: Origin.
Git push-u origin master//submits something from the local repository to the address that is the origin address, under the master branch.
The use of Git in iOS