1. compared with CVS and SVN, the git version control system supports offline development and offline Repository-powerful branch functions and is suitable for collaboration among multiple independent developers-speed block ps: the more detailed introduction of git is not described here. it is critical to teach you how to use it. :)... 1. git version control system
Advantages over CVS/SVN:
-Supports offline development and offline Repository
-Powerful branch functions, suitable for collaboration between multiple independent developers
-Speed block
Ps: For more details about the advantages of git, I will not introduce it here. it is critical to teach you how to use it. :)
3. install the git program and perform the following operations:
$ Cd ~ //. Ssh // Check the ssh key of the computer
If No prompt is displayed: No such file or directory indicates that you are not using git for the first time. perform the following operations to clear the original ssh key.
Ssh-keygen-t rsa-C "defnngj@gmail.com" // enter the email address and press enter until OK
Open the local file .. \. ssh \ id_rsa.pub. This file contains the adult key generated just now.
4. log on to the github system. Click Account Settings ---> SSH Public keys ---> add another public keys
Copy the locally generated key to it (in the key text box) and click add key.
5. open git and test whether the connection is successful.
$ Ssh-T git@github.com
Note: Hi defnngj You 've successfully authenticated, but GitHub does not provide shell access.
6. set user information:
6.1
$ Git config -- global user. name "defnngj" // give yourself a username $ git config -- global user. email "defnngj@gmail.com" // enter your mailbox
Copy code
6.2
Find the Account Settings ---> Account Admin in github and find the information:
Your API token is e97279836f0d424a3954c1193dba522f --- keep it secret! Changing your password will
Generate a new token
$ Git config -- global github. user defnngj // username on github $ git config -- global github. token e97279836f0d=a3954c1193dba522f
Copy code
============================== Create a project ========
1. return to the github homepage and click "New Repository" in the lower right corner of the page"
Enter the Project Information:
Project name: hello world
Description: my first project
Click "Create Repository". Now a project is created on github.
2. we need to use git to create an identical project locally.
$ Makdir ~ /Hello-world // create a project hello-world $ cd ~ /Hello-world // open this project $ git init // initialize $ touch README
$ Git add README // update the README file $ git commit-m 'first commit '// submit the update and comment out the information "first commit" $ git remote add origin git@github.com: defnngj/hello-world.git // connect to remote github project $ git push-u origin master // update local project to github project
Copy code
Check the hello world project on github to see if the local README file has been updated. :) Congratulations!
------------------------------------ Possible errors ----------------------------------
This article is to refer to the official help: http://help.github.com/win-set-up-git/ is basically the same as the official steps, I am here to translate it!
For more information, visit http://progit.org/book/zh/to learn more.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.