Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> ระบบ >> Windows

ติดตั้ง Git Bash บน Windows 10

Git Bash เป็น terminal emulator สำหรับ Windows ใช้ Git command line experience ด้วย Git Bash ทำงานกับการเปลี่ยนแปลงโค้ดบน terminal เอง ไม่ต้อง coding environment อื่น เช่น Atom, Notepad++, ฯลฯ

Git ติดตั้งมาบน Linux systems ส่วนใหญ่ แต่หากใช้ Windows ทำตามขั้นตอนติดตั้ง Git Bash บน Windows 10

วิธีติดตั้ง Git Bash บน Windows

ติดตั้ง Git for Windows จาก official download link ง่าย แต่ควรเช็ค steps ที่นี่หลีกเลี่ยง syncing errors ต่อไป สำหรับ Linux users มี beginner guide ติดตั้ง Git

ติดตั้ง Git Bash บน Windows 10

หลังดาวน์โหลด เลือก components ต้องการติดตั้ง ลบที่ไม่ต้องการ ยอมรับ GNI General public license

ติดตั้ง Git Bash บน Windows 10

ขั้นต่ำ ต้อง enable: "Git Bash" และ "Git GUI", "enable Git support for large files", "associate .git configuration files with the default text editor", "associate .sh files to be run with Bash"

ติดตั้ง Git Bash บน Windows 10

สำหรับ Windows 10 users Git folder สร้าง default ใน "Program Files" เลือกไม่สร้าง Start menu folder ได้

ขั้นตอนถัดไป เลือก default editor โดย Git Vim เป็น default มี options อื่น: Notepad++, Atom, Visual Studio Code, Sublime Text tutorial นี้ใช้ Vim

ถัดไป ถาม initial branch name ควรตั้ง "let Git decide" ปรับ path environment เลือก recommended "Git from the command line and also from 3rd-party software"

ติดตั้ง Git Bash บน Windows 10

ขั้นตอนถัดไป เลือก HTTPS transport backend ใช้ OpenSSL library สำหรับ superior authentication

ติดตั้ง Git Bash บน Windows 10

Git convention อีกอย่าง: line endings ใน text files เลือก "Checkout Windows-style, commit Unix-style line endings"

ติดตั้ง Git Bash บน Windows 10

ต้องการ terminal emulator สำหรับ Git Bash เลือก MinTTY default terminal ของ MSYS2 แทน Windows 10 default console window ช่วยแยก Git operations จาก PC functions ที่เหลือ MinTTY window รู้สึกเหมือน command terminal

ติดตั้ง Git Bash บน Windows 10

Git "Pull" requests ควรจัดการอย่างไร? เลือก default option

ติดตั้ง Git Bash บน Windows 10

จัดการ GitHub และ third-party credentials เลือก "Git Credential Manager Core"

ติดตั้ง Git Bash บน Windows 10

Additional Options

มี extra options ต้อง configure เลือก "enable file system caching" เพื่อ performance boost มี experimental features หน้าจอถัดไป เช่น pseudo consoles ปลอดภัยที่จะ ignore

ติดตั้ง Git Bash บน Windows 10

ใช้เวลานานซักนาที Git ติดตั้งบนเครื่อง

ติดตั้ง Git Bash บน Windows 10

Git Setup Wizard ติดตั้ง Git เสร็จ เปิด Git Bash หรือเปิด program terminal จาก Windows search box ในโหมด "Administrator"

ติดตั้ง Git Bash บน Windows 10

ตอนนี้เรียนรู้ steps ติดตั้ง Git Bash terminal emulator บน Windows 10 ถูกต้องแล้ว สามารถทดลอง Git functions ต่างๆ เช่น Git Aliases มีคู่มือเริ่มต้น GitHub project management อีกด้วย host blog ฟรีกับ Jekyll และ GitHub Pages