# push ขึ้น Gitea repo นี้ผูก remote ไว้แล้วและ **push ได้แบบไม่ต้องล็อกอินซ้ำ** ในเครื่องนี้ (credential ถูกเก็บไว้แล้ว) ``` remote : http://103.107.52.82:3004/alterflixhub/web-alterflixhub.git branch : main ``` ## คำสั่งที่ใช้จริง ```bash cd D:/Git/workspace/web-alterflixhub git -c http.version=HTTP/1.1 push origin main ``` **ต้องใส่ `-c http.version=HTTP/1.1` เสมอ** — Gitea ตัวนี้ปิด HTTP/2 ไว้ ทำให้ push แบบ HTTP/2 ค้าง/หลุดกลางทาง ## ลำดับก่อน push (ทำทุกครั้ง) ```bash pnpm typecheck # ต้องผ่าน npx vitest --run app/lib # unit tests (16 ไฟล์ / 135+ ตัว) git add -A git commit -m "..." # ข้อความสั้น บอกสิ่งที่เปลี่ยน git -c http.version=HTTP/1.1 push origin main ``` ถ้าแก้ `public/sw.js` ต้อง bump `VERSION` ในไฟล์นั้นก่อน commit (ขั้น activate จะเก็บกวาดแคชเก่าให้เอง) ## ถ้า credential หมดอายุ / ขึ้น 401 สร้าง token ที่ Gitea → Settings → Applications → Generate New Token (สิทธิ์ `write:repository`) แล้วตั้ง remote ใหม่ (แทน `` ด้วยค่าจริง — **ห้ามเก็บลงไฟล์ที่ commit**): ```bash git remote set-url origin "http://Bkk1234:@103.107.52.82:3004/alterflixhub/web-alterflixhub.git" ``` หรือล็อกอินผ่าน Git Credential Manager จาก terminal ปกติของ Windows (ไม่ผ่าน agent) แล้ว `git push` หนึ่งครั้ง ## ตรวจว่าขึ้นจริง ```bash git log --oneline -1 origin/main # ต้องเห็น commit ล่าสุด git status -sb # ต้องไม่มี ahead git ls-remote origin main # hash ต้องตรงกับ HEAD ```