git下載地址
https://git-scm.com/download/win
選擇安裝的組件,推薦全選
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更新
選擇git的編輯器,我選擇了vim
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 的默認編輯器
配置path環境
Use Git from Git Bash only
這是最安全的選擇,因為您的PATH根本不會被修改。您只能使用 Git Bash 的 Git 命令行工具。
Use Git from the Windows Command Prompt
這個選項被認為是安全的,因為它只向PATH添加一些最小的 Git包,以避免使用可選的Unix工具混淆環境。 您將能夠從 Git Bash 和 Windows 命令提示符中使用 Git。
Use Git and optional Unix tools from the Windows Command Prompt
Git和可選的Unix工具都將添加到您計算機的 PATH 中
警告:這將覆蓋Windows工具,如 “ find 和 sort ”。只有在了解其含義后才使用此選項。
Use the OpenSSL library 使用 OpenSSL 庫
服務器證書將使用ca-bundle.crt文件進行驗證。
Use the native Windows Secure Channel library 使用本地 Windows 安全通道庫
服務器證書將使用Windows證書存儲驗證。此選項還允許您使用公司的內部根CA證書,例如, 通過Active Directory Domain Services 。
配置行結束轉換
Checkout Windows-style,commit Unix-style line endings 安裝windows方式檢出,使用linux方式提交
在檢出文本文件時,Git會將LF轉換為CRLF。當提交文本文件時,CRLF將轉換為LF。 對於跨平台項目,這是Windows上推薦的設置(“core.autocrlf”設置為“true”)
Checkout as-is , commit Unix-style line endings 按原樣檢出,linux方式提交
在檢出文本文件時,Git不會執行任何轉換。 提交文本文件時,CRLF將轉換為LF。 對於跨平台項目,這是Unix上的推薦設置 (“core.autocrlf”設置為“input”)
Checkout as-is,commit as-is 按原樣檢出,原樣提交
在檢出或提交文本文件時,Git不會執行任何轉換。對於跨平台項目,不推薦使用此選項(“core.autocrlf”設置為“false”)
配置終端模擬器與git bash一起使用
Use MinTTY (the default terminal of MSYS2) 推薦使用
Git Bash將使用MinTTY作為終端模擬器,該模擬器具有可調整大小的窗口,非矩形選區和Unicode字體。 Windows控制台程序(如交互式Python)必須通過'winpty'啟動才能在MinTTY中運行。
Use Windows' default console window 默認使用windows自己
Git將使用Windows的默認控制台窗口(“cmd.exe”),該窗口可以與Win32控制台程序(如交互式Python或node.js)一起使用,但默認的回滾非常有限,需要配置為使用unicode 字體以正確顯示非ASCII字符,並且在Windows 10之前,其窗口不能自由調整大小,並且只允許矩形文本選擇。
其它的配置,默認就好
Enable file system caching 啟用文件系統緩存
文件系統數據將被批量讀取並緩存在內存中用於某些操作(“core.fscache”設置為“true”)。 這提供了顯着的性能提升。
Enable Git Credential Manager 啟用Git憑證管理器
Windows的Git憑證管理器為Windows提供安全的Git憑證存儲,最顯着的是對Visual Studio Team Services和GitHub的多因素身份驗證支持。 (需要.NET Framework v4.5.1或更高版本)。
Enable symbolic links 啟用符號鏈接
啟用符號鏈接(需要SeCreateSymbolicLink權限)。請注意,現有存儲庫不受此設置的影響。
使用中遇到的問題
如果中文沒有顯示
參考
https://blog.csdn.net/sishen47k/article/details/80211002