--- --- restore content begins
Benpian notes talk about Git installation and tutorial
First, know Git
What is Git?
Git is a distributed version control system open source, can efficiently at high speed process from small to very large version of the project management. Git is Linus Torvalds To help manage Linux kernel development and the development of an open source version control software.
Git is a version control tool.
Github is very famous online version management website (slower).
Oschina Chinese version of github, (the code's cloud address: gitee.com, speed)
When we use the ssh key ssh login server, will generally common login with the username / password mode, use the ssh key can be implemented free login password. (Ssh is a network protocol used between computers encrypted login)
Even if the public key is intercepted on the Internet, if not its matching private key can not decrypt intercepted the public is no use of Public-key cryptography (public key encryption)
Git functions are as follows:
1, a complete clone Git repository (including code and version information) from the server to the standalone.
2, on their own machines based on different development purposes, create a branch, modify the code.
3, merging branches on a single machine.
4, see the main developer feedback, if developers find the main conflict (can work together to resolve the conflict between them) between two general developer, will require them to resolve the conflict before submitting by one person. If the primary developers themselves, or there is no conflict, on the adoption.
Git features :
1, branch flexibility: users can always create, merge, delete, branch, people perform different functions, you can create multiple branches to develop, after the merger branch, in this way the development is quick, simple and safe.
2, save points: Git point can save trace files in the source code, and can get state of the entire project on a certain point in time; the source code can be incorporated in the submission of more than save point, you can fall back to a a save point
3, branching and merging in Git: Git branching model is the most significant feature, because it changes the development model developers, SVN and other version control tools each branch should be placed in a different directory, Git may be in the same directory switch between different branches.
Two, Git customer side installation
download
Blog Git version is 2.14.0. We can download the latest Git customer service side from the official website: Git Download
installation
After the download is complete open the installation package
OpenSSL is a Secure Sockets Layer cryptographic libraries include major cryptographic algorithms commonly used key and certificate management and SSL protocol encapsulation, and provides a wealth of applications for testing or other purposes.
OpenSSL is a development kit based on the security of cryptography, OpenSSL provide quite powerful and comprehensive, covering major cryptographic algorithms, key and certificate common package management functions as well as the SSL protocol.
But in fact is a lot of loopholes.
CA application provides OpenSSL is a small certificate authority (CA), the entire process to achieve most of the mechanism and certificate management certificate issued.
OpenSSL ca-bundle file may be generated, a certificate chain functions as described
Let applications use OpenSSL library to implement server authentication
Git to convert the carriage return line feed and other issues, line feed (LF) Windows of the carriage return line feed (CRLF);
After the installation is complete, you can see a shortcut on the desktop
See the following interface, says the installation was successful
Such default ~ / generation id_rsa .ssh directory in the local, id_rsa.pub two files: id_rsa private key id_rsa.pub is the public key.
Next we open cloud code official website
What is the code cloud? For details, please point it
码云是开源中国社区2013年推出的基于 Git 的完全免费的代码托管服务,这个服务是基于 Gitlab 开源软件所开发的,我们在 Gitlab 的基础上做了大量的改进和定制开发,目前已经成为国内最大的代码托管系统,致力于为国内开发者提供优质稳定的托管服务。
点击注册一个账号
这时你的邮箱会发来一份邮件
点击完善资料
id_rsa.pus公钥的所在位置上面有讲到,如果打不开的文件请用excel打开即可。
Gitee帐号的密码,验证才让添加
成功添加后,见到刚刚添加的MyKey
回到首页上,点击创建项目。
复制SSH地址
创建一个文件夹
把密钥目录复制进去,便于git能够访问
Testgit01创建成功
本地建立Test.java 测试上传
服务器上已经见到刚刚上传的文件,以及注释等信息。