Repo แรกของคุณ ตั้งแต่ต้นจนจบ
นี่คือวงจรทั้งหมดในที่เดียว สร้างโฟลเดอร์ ทำให้มันเป็น repo บันทึกงานของคุณ แล้ว push ขึ้น GitHub:
# 1. Start a new project
mkdir my-first-project
cd my-first-project
git init
# 2. Protect your secrets before anything else
echo ".env" > .gitignore
# 3. Make your first save point
git add .
git commit -m "Initial commit"
# 4. Connect to GitHub and push it up
git remote add origin https://github.com/yourname/my-first-project.git
git push -u origin main
แค่นี้เอง ตอนนี้คุณมีโปรเจกต์ที่มีตาข่ายนิรภัยและข้อมูลสำรองบนคลาวด์แล้ว ทุกครั้งที่คุณมีความคืบหน้า ให้ทำจังหวะ add → commit → push ซ้ำ ๆ