1. 程式人生 > >Git 中文詳細安裝教程

Git 中文詳細安裝教程

Git Setup 2.17.0

Git 中文安裝教程

AUTHOR: 謝宗南

本人 GitHub 原文地址

Step 1 Information

資訊

Please read the following important information before continuing

繼續之前,請閱讀以下重要資訊

Step 2 Select Destination Location

選擇安裝位置

Step 3 Select Components

選擇元件

Additional icons 附加圖示

On the Desktop

在桌面上

Windows Explorer integration Windows資源管理器整合滑鼠右鍵選單

Git Bash Here

Git GUI Here

Git LFS (Large File Support)

大檔案支援

Associate .git* configuration files with the default text editor

將 .git 配置檔案與預設文字編輯器相關聯

Associate .sh files to be run with Bash

將.sh檔案關聯到Bash執行

Use a TrueType font in all console windows

在所有控制檯視窗中使用TrueType字型

Check daily for Git for Windows updates

每天檢查Git是否有Windows更新

Step 4 Select Strat Menu Folder

建立開始選單目錄

Step 5 Choosing the default editor used by Git

選擇Git使用的預設編輯器

Use the Nano editor by default

預設使用 Nano 編輯器

Use Vim (The ubiquitous text editor) as Git's default editor

使用 Vim 作為 Git 的預設編輯器

Use Notepad++ as Git's default editor

使用 Notepad++ 作為 Git 的預設編輯器

Use Visual Studio Code as Git's default editor

使用 Visual Studio Code 作為 Git 的預設編輯器

Step 6 Adjusting your PATH environment

配置PATH環境

Use Git from Git Bash only

This is the safest choice as your PATH will not be modified at all.You will only be able to use the Git command line tools form Git Bash.

這是最安全的選擇,因為您的PATH根本不會被修改。您只能使用 Git Bash 的 Git 命令列工具。

Use Git from the Windows Command Prompt

This option is considered safe as it only adds some minimal Git wrappers to your PATH to avoid cluttering your environment with optional Unix tools . You will be able to use Git from both Git Bash and the Windows Command Prompt.

這個選項被認為是安全的,因為它只向PATH新增一些最小的 Git包,以避免使用可選的Unix工具混淆環境。 您將能夠從 Git Bash 和 Windows 命令提示符中使用 Git。

Use Git and optional Unix tools from the Windows Command Prompt

從Windows命令提示符使用Git和可選的Unix工具

Both Git and the optional Unix tools will be added to you PATH

Git和可選的Unix工具都將新增到您計算機的 PATH 中

Warning:This will override Windows tools like "find and sort".Only use this option if you understand the implications.

警告:這將覆蓋Windows工具,如 “ find 和 sort ”。只有在瞭解其含義後才使用此選項。

Step 7 Choosing HTTPS transport backend

選擇HTTPS傳輸後端

Use the OpenSSL library

使用 OpenSSL 庫

Server certificates will be validated using the ca-bundle.crt file.

伺服器證書將使用ca-bundle.crt檔案進行驗證。

Use the native Windows Secure Channel library

使用本地 Windows 安全通道庫

Server certificates will be validated using Windows Certificate Stores.This option also allows you to use your company's internal Root CA certificates distributed e.g. via Active Directory Domain Services.

伺服器證書將使用Windows證書儲存驗證。此選項還允許您使用公司的內部根CA證書,例如, 通過Active Directory Domain Services 。

Step 8 Configuring the line ending conversions

配置行結束轉換

Checkout Windows-style,commit Unix-style line endings

Git will convert LF to CRLF when checking out text files.When committing text files,CRLF will be converted to LF .For cross-pltform projects,this is the recommended setting on Windows ("core.autocrlf" is set to "true")

在檢出文字檔案時,Git會將LF轉換為CRLF。當提交文字檔案時,CRLF將轉換為LF。 對於跨平臺專案,這是Windows上推薦的設定(“core.autocrlf”設定為“true”)

Checkout as-is , commit Unix-style line endings

Git will not perform any conversion when checking out text files. When committing text files, CRLF will be converted to LF. For cross-platform projects,this is the recommended setting on Unix ("core.autocrlf" is set to "input")

在檢出文字檔案時,Git不會執行任何轉換。 提交文字檔案時,CRLF將轉換為LF。 對於跨平臺專案,這是Unix上的推薦設定 (“core.autocrlf”設定為“input”)

Checkout as-is,commit as-is

Git will not perform any conversions when checking out or committing text files.Choosing this option is not recommended for cross-platform projects ("core.autocrlf"is set to "false")

在檢出或提交文字檔案時,Git不會執行任何轉換。對於跨平臺專案,不推薦使用此選項(“core.autocrlf”設定為“false”)

Step 9 Configuring the terminal emulator to use with Git Bash

配置終端模擬器以與 Git Bash 一起使用

Use MinTTY (the default terminal of MSYS2)

Git Bash will use MinTTY as terminal emulator,which sports a resizable window,non-rectangular selections and a Unicode font. Windows console programs (such as interactive Python) must be launched via 'winpty' to work in MinTTY.

Git Bash將使用MinTTY作為終端模擬器,該模擬器具有可調整大小的視窗,非矩形選區和Unicode字型。 Windows控制檯程式(如互動式Python)必須通過'winpty'啟動才能在MinTTY中執行。

Use Windows' default console window

Git will use the default console window of Windows ("cmd.exe"),which works well with Win32 console programs such as interactive Python or node.js , but has a very limited default scroll-back,needs to be configured to use aUnicode font in order to display non-ASCII characters correctly,and prior to Windows 10 its windows was not freely resizable and it only allowed rectangular text selections.

Git將使用Windows的預設控制檯視窗(“cmd.exe”),該視窗可以與Win32控制檯程式(如互動式Python或node.js)一起使用,但預設的回滾非常有限,需要配置為使用unicode 字型以正確顯示非ASCII字元,並且在Windows 10之前,其視窗不能自由調整大小,並且只允許矩形文字選擇。

Step 10 Configuring extra options

配置額外的選項

Enable file system caching

啟用檔案系統快取

File system data will be read in bulk and cached in memory for certain operations ("core.fscache" is set to "true"). This provides a significant performance boost.

檔案系統資料將被批量讀取並快取在記憶體中用於某些操作(“core.fscache”設定為“true”)。 這提供了顯著的效能提升。

Enable Git Credential Manager

啟用Git憑證管理器

The 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 or later).

Windows的Git憑證管理器為Windows提供安全的Git憑證儲存,最顯著的是對Visual Studio Team Services和GitHub的多因素身份驗證支援。 (需要.NET Framework v4.5.1或更高版本)。

Enable symbolic links

啟用符號連結

Enable symbolic links (requires the SeCreateSymbolicLink permission).Please note that existing repositories are unaffected by this setting.

啟用符號連結(需要SeCreateSymbolicLink許可權)。請注意,現有儲存庫不受此設定的影響。

Step 11 Installing

Step 12 Completing the Git Setup Wizard

 本人公眾號,會有一些技術的分享,感興趣的小夥伴可以一起討論。