Windows system Git installation tutorial (detailed Git installation process)

Get the Git installer

  Go to Git official website to download, website address: https://git-scm.com/downloads, as shown below:

  Because we use the browser on the Windows system to visit, the Git official website automatically changes to the operating system I use, so the download and use of the latest version of the Windows system is directly displayed on the right (if the identification is wrong, you can select the system in the middle), click to download. I downloaded 2.24.0 for Windows, and the file name is "Git-2.24.0.2-64-bit.exe". After downloading to the computer, double-click the file to enter the installation process.

Git installation process

  Double-click to see the first interface as shown below:

01. License statement

  Click "Next" to enter the following page:

02. Select the installation path

  Enter the local path you want to install in the input box, that is, the actual folder location, or click "Browse..." to select an existing folder, and then click the "Next" button to continue and enter the following interface:

03. Select installation components

  The options in the red box above are checked by default, and it is recommended not to move them. Green box 1 is to decide whether to create a shortcut on the desktop. Green box 2 is the decision to use TrueType fonts in all console windows and whether to check Git daily for Windows updates. These are selected according to your needs.

  Click the "Next" button to enter the following interface:

04. Select the start menu page

  This interface is to create the name in the start menu, there is no need to modify it, just click the "Next" button to continue to the interface as shown below:

05. Select the default editor for Git files

  This page is to select the default editor for Git files, which is rarely used, so Vim is the default, just click the "Next" button to continue to the interface as shown below:

06. Adjust your PATH environment

  This interface is to adjust your PATH environment.

  The first configuration is "Use Git only from Git Bash". This is the safest option, since your PATH will not be modified at all. You can only use the Git command line tool with Git Bash. But this will not be available through third-party software.

  The second configuration is "Git from the command line as well as third-party software". This option is considered safe because it only adds some minimal Git wrappers to PATH to avoid cluttering the environment with optional Unix tools.
You'll be able to use Git from Git Bash, Command Prompt, and Windows PowerShell, as well as any third-party software that looks for Git in your PATH. This is also the recommended option.

  The third configuration is "Use Git and optional Unix tools from a command prompt". WARNING: This will override Windows tools like "find and sort". Use this option only if you understand its implications.

  I choose the recommended option, the second configuration, and click the "Next" button to continue to the interface as shown below:

07. Select HTTPS backend transmission

  This interface is to select the HTTPS backend transport.

  The first option is "Use OpenSSL library". The server certificate will be verified using the ca-bundle.crt file. This is also our usual option.

  The second option is "Use native Windows secure channel library". The server certificate will be verified using the Windows certificate store. This option also allows you to use your company's internal root CA certificate, for example through Active Directory Domain Services.

  I use the first option of the default option, click the "Next" button to continue to the interface as shown below:

08. Configure end-of-line symbol conversion

  This interface is to configure end-of-line symbol conversion.

  The first option is "Check out Windows-style, commit Unix-style line endings". When checking out a text file, Git converts LF to CRLF. CRLF will be converted to LF when submitting text files. For cross-platform projects, this is the recommended setting on Windows ("core.autocrlf" set to "true")

  The second option is "Check out as is, commit Unix-style line endings". Git does not perform any conversions when checking out text files. CRLF will be converted to LF when submitting text files. For cross-platform projects, this is the recommended setting on Unix ("core.autocrlf" set to "input")

  The third option is "check out as is, commit as is". Git does not perform any transformations when checking out or committing text files. This option is not recommended for cross-platform projects ("core.autocrlf" is set to "false")

  I choose the first option and click the "Next" button to continue to the interface as shown below:

09. Configure a terminal emulator to work with Git Bash

  This interface is to configure a terminal emulator for use with Git Bash.

  The first option is "Use MinTTY (MSYS2's default terminal)". Git Bash will use MinTTY as a terminal emulator with resizable windows, non-rectangular selections, and Unicode fonts. Windows console programs (such as interactive Python) must be started via "winpty" to run in MinTTY.

  The second option is "Use Windows' default console window". Git will use Windows' default console window ("cmd.exe"), which can be used with Win32 console programs such as interactive Python or node.js, but the default rollback is very limited and needs to be configured to use unicode fonts to correctly display non-ASCII characters, and prior to Windows 10, its window was not freely resizable and only allowed rectangular text selection.

  I choose the default first option, click the "Next" button to continue to the interface as shown below:

10. Configure additional options

  This interface is configured to configure additional options.

  The first option is "Enable file system caching". File system data will be read in batches and cached in memory for some operations ("core.fscache" set to "true"). This provides a significant performance boost.

  The second option is "Enable Git Credentials Manager". Git Credential Manager for Windows provides secure Git credential storage for Windows, most notably multi-factor authentication support for Visual Studio Team Services and GitHub. (Requires .NET Framework v4.5.1 or higher).

  The third option is "Enable Symbolic Links". Enable symbolic links (requires SeCreateSymbolicLink permission). Note that existing repositories are not affected by this setting.

  I checked the default first and second options, and clicked the "Next" button to continue to the following interface:

11. Configure experiment options

  This interface is to configure experimental options.

  Enable experimental builtins add -i/-p. (NEW!) Use the experimental built-in interactive add ("git add -i" or "git add -p"). This makes it faster (especially to boot!), but not yet considered reliable.

  It is not checked by default, just click the "Next" button to continue to the installation progress interface as shown below:

12. Installation progress indication

  After the installation progress is completed, the following figure will appear to complete the Git installation wizard interface:

13. The installation is complete

  In this interface, you can check whether to start Git Bash and whether to view the release notes, and then click the "Finish" button to exit the installation interface.

14. Start the test

  At this point, the installation of Git is complete, and you can see the three startup icons of Git (Git Bash, Git CMD (Deprecated), Git GUI) in the start menu.

  Git Bash is a console supporting Git, click to open as shown below:

  Git CMD (Deprecated), is to use Git through CMD (not recommended), click to open the following picture:

  Git GUI is a visual operation tool for Git, click to open it as shown below:

  The installation process of Git is introduced here.

Guess you like

Origin blog.csdn.net/weixin_45925028/article/details/132292509