-
1. เริ่มต้นใช้งาน
- 1.1 เกี่ยวกับ Version Control
- 1.2 ประวัติย่อของ Git
- 1.3 Git ขั้นพื้นฐาน
- 1.4 การติดตั้ง Git
- 1.5 First-Time Git Setup
- 1.6 Getting Help
- 1.7 สรุป
-
2. Git ขั้นพื้นฐาน
- 2.1 เริ่มต้นใช้งาน Git Repository
- 2.2 การบันทึกการแก้ไขใน Repository
- 2.3 Viewing the Commit History
- 2.4 Undoing Things
- 2.5 Working with Remotes
- 2.6 Tagging
- 2.7 Tips and Tricks
- 2.8 Summary
-
3. Git Branching
- 3.1 What a Branch Is
- 3.2 Basic Branching and Merging
- 3.3 Branch Management
- 3.4 Branching Workflows
- 3.5 Remote Branches
- 3.6 Rebasing
- 3.7 Summary
-
4. Git on the Server
- 4.1 The Protocols
- 4.2 Getting Git on a Server
- 4.3 Generating Your SSH Public Key
- 4.4 Setting Up the Server
- 4.5 Public Access
- 4.6 GitWeb
- 4.7 Gitosis
- 4.8 Gitolite
- 4.9 Git Daemon
- 4.10 Hosted Git
- 4.11 Summary
-
5. Distributed Git
- 5.1 Distributed Workflows
- 5.2 Contributing to a Project
- 5.3 Maintaining a Project
- 5.4 Summary
-
6. Git Tools
- 6.1 Revision Selection
- 6.2 Interactive Staging
- 6.3 Stashing
- 6.4 Rewriting History
- 6.5 Debugging with Git
- 6.6 Submodules
- 6.7 Subtree Merging
- 6.8 Summary
-
7. Customizing Git
- 7.1 Git Configuration
- 7.2 Git Attributes
- 7.3 Git Hooks
- 7.4 An Example Git-Enforced Policy
- 7.5 Summary
-
8. Git and Other Systems
- 8.1 Git and Subversion
- 8.2 Migrating to Git
- 8.3 Summary
-
9. Git Internals
- 9.1 Plumbing and Porcelain
- 9.2 Git Objects
- 9.3 Git References
- 9.4 Packfiles
- 9.5 The Refspec
- 9.6 Transfer Protocols
- 9.7 Maintenance and Data Recovery
- 9.8 Summary
1.2 เริ่มต้นใช้งาน - ประวัติย่อของ Git
ประวัติย่อของ Git
เช่นเดียวกันกับหลายสิ่งในชีวิตที่ยิ่งใหญ่ Git เริ่มต้นจากส่วนผสมของความคิดริเริ่มที่สั่นคลอนสถานะปัจจุบันเล็กน้อยแต่ทำให้เกิดผลกระทบในวงกว้าง โปรเจคลีนุกซ์เคอร์เนล (Linux kernel) ถือเป็นซอฟต์แวร์แบบโอเพนซอร์สที่มีขนาดค่อนข้างใหญ่ ในช่วงปี 1991-2002 การพัฒนาเคอร์เนลถูกแชร์กันไปมาผ่าน patch และไฟล์ซอร์สโค้ดที่ถูกบีบอัด จากนั้นในปี 2002 ก็มีการเริ่มนำเครื่องมือ DVCS ที่ไม่ใช่โอเพนซอร์สชื่อ BitKeeper มาใช้งาน
ในปี 2005 ความสัมพันธ์ระหว่าง community ที่พัฒนาลีนุกซ์เคอร์เนลและบริษัทที่พัฒนา BitKeeper มีอันต้องจบลง และการใช้งานเครื่องมือนี้แบบฟรีก็ถูกยกเลิกไป ทำให้นักพัฒนาทั้งหลาย (โดยเฉพาะอย่างยิ่งไลนัส ทอร์วอลด์ ผู้สร้างลีนุกซ์) ต้องพัฒนาเครื่องมือของตัวเองขึ้นมาจากประสบการณ์ที่่มีอยู่ระหว่างการใช้งาน BitKeeper โดยมีวัตถุประสงค์ดังนี้:
- ความเร็ว
- ดีไซน์ที่เรียบง่าย
- สนับสนุนการทำงานหลายทางพร้อม ๆ กัน (เช่นมี branch การพัฒนาเป็นพัน)
- แยกศูนย์
- สามารถรองรับโปรเจคขนาดใหญ่อย่างลีนุกซ์เคอร์เนลได้เป็นอย่างดี (ทั้งในแง่ความเร็วและขนาดของข้อมูล)
ตั้งแต่เริ่มต้นเมื่อปี 2005 Git ได้ถูกทำให้ใช้งานง่ายขึ้นแต่ก็ยังคงความสามารถตามวัตถุประสงค์เดิมเอาไว้ โดยสามารถทำงานได้เร็วเหลือเชื่อ ใช้พื้นที่น้อยสำหรับโปรเจคใหญ่ ๆ และก็มีระบบการ branch ที่สนับสนุนการทำงานหลายทางพร้อม ๆ กัน (ดูบทที่ 3)