First, GitHub introduction
Git is a very well-known code-hosting tool. Of course now there is the GitHub for Windows version (similar to SVN tortoise).
Of course, you can use this client instead of cumbersome commands. Download github for Windows.
Installation and use, this is not introduced here. Specific can Baidu will know. This article does not talk about how to use the client, but teaches you to build with commands, including SSH key generation
Second, GitHub management interface website
1, Registration: Remember mailbox
2. Git Initialize account | password
git config--global user.email "[email protected]" --global user.name "Your name"
3. Find a directory, right-click Git bash (if you want to install GitHub for Windows), Generate SSH key key
Ssh-keygen-t rsa-c "Your Mailbox"
If successful, the. SSH directory is created under the ~/directory.
Go to the ~/.ssh/directory vim id_rsa.pub. Copy the contents of the Id_rsa.pub
4. Go to the GitHub Personal Settings page. Settings--"SSH and GPG Keys--" new SSH Key---Copy the contents of Id_rsa.pub to key
5. Verify that SSH key is in effect
ssh-t [email protected]
The results may appear as follows
The authenticity of host ' github.com (192.30.253.112) ' can ' t be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Is you sure want to continue connecting (yes/no)?
Enter Yes
warning:permanently added ' github.com,192.30.253.112 ' (RSA) to the list of known hosts.
Hi xpw! You've successfully authenticated, but GitHub does not provide shell access.
That means it's a success.
6. Immediately. See how GitHub managed the code.
①, creating warehouses repository
②, pull the remote branch down to
git clone "Https://github.com/xpw/gitDemo.git"
Results
Cloning into ' gitdemo ' ...
Warning:you appear to has cloned an empty repository.
Checking connectivity ... done.
Then go to the project catalog Gitdemo directory
Add a file Test.txt, vi test.txt Open after editing hi,git!
Commit code to local cache git commit a-m ' comment description '
Submit to remote GitHub, GIT push Origin master. You will be asked to enter your user name (github username) and password (GitHub registered password)
③, we can see the code record we just submitted on GitHub.
GitHub Quick Start