Version control

Centralized (Svn)

Advantages:

  • The code is kept on a single server for easy management.

Disadvantages:

  • Server down: locally written code can’t be protected (don’t change code easily (if you like CtrL-C and Ctrl-V it doesn’t matter)).
  • Server burst: History records are in danger of being lost.
  • The server stores the version directly different from the version but not the complete version (for example, A1 is stored for the first time, A2-A1 is stored for the second time, a100-A99 is stored for the 100th time). Therefore, when you need to roll back to a specific version of the project, you need to patch back step by step, which will waste a lot of time.

Distributed (Git)

Advantages:

  • The server does not store the differences between versions but the complete version (for example, A1 is stored for the first time, A2, A1 is stored for the second time, A100 is stored for the 100th time, A99 is stored for the 100th time). If you want to go back to the specific version, you will be quickly rolled back without patch.
  • You can develop without a network because version control is local.

Disadvantages:

  • More disk space is required than Svn, but not by much.

2. Git installation

Open the Git download url: according to your computer to choose the appropriate version of Git download address.

Git GUI Here and Git Bash Here are the first steps to be installed.

Git GUI Here Git Bash Here Git GUI Here The first step is to open the command line interface and see what version of Git you have. Click Git Bash Here to bring up the command line interface, where you can type Git version.

Git initialization

Git can make a project program there are a lot of people to work at the same time, if someone changes and submit the code, unreasonable Git need to give a change of time and the modifier name and so on a series of information, if you don’t give the modifier of relevant information, the company have a problem with my code can’t find who is change that’s not just finished ~. So I’m going to do some initialization of Git to complete the information.

For a computer there will be an operating system, an operating system can be operated by different users, a user will have multiple projects. So Git information configuration can also be configured with three different priorities.

  • Git config –system user.name “Jc”

Git config –system user.email “[email protected]

  • Git config –globe user.name “Jc”

Git config – globe user. The email “[email protected]

  • Git config user.name “Jc”

Git config user. The email “[email protected]

  • Git –list lets you see if your configuration is successful.

Fourth, the end

At this point, the basic deployment of Git is complete, if you feel useful you can click a thumbs-up oh! I will continue to update, if there are any mistakes please point out, thank you for your audience master.

To get a PDF of the above content, go to GitHub and download it.

Address: Git study notes area

— — — — — a romantic