Three Java Engineering--git Start

Source: Internet
Author: User
Tags sha1 hash sha1 hash algorithm version control system git commands

Git Learning reference: HTTPS://GIT-SCM.COM/BOOK/ZH/V2

Version control

Version control records the historical changes of one or several documents for future review and recovery.

Three types of version control system
    1. Local version control system RCS: Local Storage File change system, unable to collaborate and unified management of permissions
    2. Centralized version control system CVCS: Change storage in a centralized server
    3. Distributed version control system DVCS: Distributed storage repository mirroring, including all information on file history changes
History of Git

Git comes from the Linux team and is developed by Linux in order to solve the issue of BitKeeper charges before the Release management tool.

Design goals

    • Speed
    • Simple
    • Strong support for non-linear development patterns (multiple parallel branches of development)
    • Fully distributed
    • For ultra-large scale projects

Linux is open source, so when the version tools they used earlier started charging for the right, they decided to develop a version control tool, ie git.

Speaking of open source, we need to understand the common open source agreement, so that we do technology selection when considering. For example, a generic open source protocol requires open source frameworks for projects.

The difference between git and SVN (or other version control systems)
    1. Direct recording of snapshots, rather than differential comparisons

       了解此项差异的底层实现方式非常重要,有利于我们更准确的理解和学习Git.具体可以参考文章开始的网站资料.(有图有真相)
    2. Nearly all operations are performed locally (thanks to the 1th implementation, distributed storage)
    3. Git uses the SHA1 hash algorithm to calculate the checksum guarantee integrity

       Git的索引是校验值而不是文件名,如果在传送过程中有信息丢失和损坏,Git就能发现.
    4. Git typically adds only data (no data is lost as long as it is committed, reversible operations can be performed)

Pre-use configuration
    • git config --listShow All Configurations
    • git config --global user.name ‘user‘Set User name
    • git config --global user.email ‘[email protected]‘Set up user mailboxes
    • ssh-keygen -t rsa -C ‘[email protected]‘Generate SSH Key
    • Multi-User Configuration method: Create a file config under the. SSH path (C:\USERS\XUELI.SSH) and add the following

      # Default GitHub User ([email protected])
      Host github.com
      HostName github.com
      User git
      Identityfile C:\Users\xueli.ssh\id_rsa

# Default Mygitlib User ([email protected])
Host mygitlib.com
HostName mygitlib.com
User git
Identityfile C:\Users\xueli.ssh\mygitlib

It's git start and background, and next time you'll learn about Git commands.

Three Java Engineering--git Start

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.