Topic 2: Gitlab usage

ผู้เริ่มต้นใช้งาน git จะต้องตั้งค่าเครื่องคอมพิวเตอร์ให้ติดต่อกับ git โดยใช้คำสั่ง
git config --global user.name "name"
git config --global user.email "mail@gmail.com"

กรณีที่สร้าง Project ใหม่บน Gitlab แบบไม่มีไฟล์ใด ๆ ใช้คำสั่ง
git clone url
cd folder
git branch
git checkout branch_name
git status
git add .
git commit -m "add "
git push origin master

กรณีที่ Project บน Gitlab มีไฟล์ต่าง ๆ ใช้คำสั่ง
สร้าง folder ใหม่git init
git remote add origin url
git pull origin branch_name
git branch
git checkout branch_name
git status
git add .
git commit -m "add "
git push origin master




ความคิดเห็น