Monday, October 31, 2016

คำสั่งที่ใช้ในการดึงข้อมูลที่อยู่ใน git มาใหม่ โดยเขียนทับของเดิมที่อยุ่ในเครื่อง local ทั้งหมด

git fetch --all 

git  reset --hard origin/master

คำอธิบาย
git fetch ใช้ในการดาวน์โหลด version ล่าสุดจากเครื่อง remote server
git reset  ใช้สำหรับ reset branch ที่ต้องการ ส่วน --hard เป็น option ที่ใช้สำหรับเปลี่ยน files ในเครื่อง local ให้ match กับ remote server

No comments:

Post a Comment