Git คืออะไร

Git เป็นระบบจัดการเวอร์ชั่นของไฟล์ (Version Control) โดยมีการจัดระเบียบข้อมูลด้วยการใช้ Git

ตัว Git เป็น Open Source ของ GitHub

Git is a version control system for tracking changes in computer files and coordinating work on those files among multiple people. It is primarily used for source code management in software development, but it can be used to keep track of changes in any set of files. As a distributed revision control system it is aimed at speed, data integrity, and support for distributed, non-linear workflows. - Wikipediaopen in new window

เป้าหมายของ Git

ข้อดีของการทำ Versioning

ขั้นตอนการทำงานของ Git

  1. ไฟล์ถูกเพื่ม (Untracked)
  2. ไฟล์เคยมีอยู่ในระบบแล้ว (Unstaged)
  3. ไฟล์ถูกจดจำ (Staged)
  4. ไฟล์ถูกจัดเก็บเป็นเวอร์ชั่น (Locally Commited)
  5. ไฟล์ถูกจักเก็บเป็นเวอร์ชั่น และ อับโหลดขื้นส่วนกลางแล้ว (Remotely Commited)
  6. ดึงจากส่วนกลางลงมาใช้งาน (Pull)

ซึ่งแต่ละขั้นตอนมีหลักการแตกต่างกัน เพราะทำหน้าที่แยกกัน