หลักการคือเราจะอัพโหลดไฟล์เฉพาะ ไฟล์โค้ดโปรแกรม สำหรับแชร์ทำงานร่วมกับคนอื่นในทีม ไม่เอาไฟล์ byte code ที่ complies แล้ว ไม่เอาโมดูลที่ติดตั้งเสริม ของแต่ละภาษา
ตัวอย่างไฟล์
โค้ด: เลือกทั้งหมด
# Node artifact files
node_modules/
# Compiled Java class files
*.class
# Compiled Python bytecode
*.py[cod]
# Log files
*.log
# Package files
*.jar
# Maven
target/
# JetBrains IDE
.idea/
# Unit test reports
TEST*.xml
# Generated by MacOS
.DS_Store
# Generated by Windows
Thumbs.db
# Applications
*.app
*.exe
*.war
# Large media files
*.mp4
*.tiff
*.avi
*.flv
*.mov
*.wmv
**/.env
**/*.env
**/app/public/upload/*
**/app/config/config.json
- ไม่อัพไฟล์ขนาดใหญ่ ทั้งไฟล์ เสียง ไฟล์ vdo
- ไม่อัพไฟล์เกี่ยวกับ .env ทั้งหมด กรณีเป็น node.js, python
- ไม่อัพไฟล์ Applications เช่น .exe, .zip, .app,..
- ไม่อัพไฟล์ .log
- ไม่อัพไฟล์ session หรือ ไฟล์ folder upload
node_modules/ หมายถึงไม่เอาไฟล์ที่อยู่ใน Folder node_modules ทั้งหมด (ตามตัวอย่างนี้ ไฟล์โมดูลของ node.js)
สอนการใช้งาน gitlab กับพัฒนาโค้ดร่วมกัน