Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
IT Security NachrichtenSeite 2: Wesentlich ist wichtiger als wichtig | heise online(23.09.2026 um 03:06 Uhr)
IT Security NachrichtenNetBSD 10.2 security fixes close a remote kernel bug in ipfilter(23.09.2026 um 05:16 Uhr)
IT Security NachrichtenBurnout in der IT: das unterschätzte Sicherheitsrisiko(23.09.2026 um 05:08 Uhr)
IT Security NachrichtenActive Matter Review (PC)(23.09.2026 um 05:24 Uhr)
IT NachrichtenDarkwing Duck kehrt zurück zu Disney+(23.09.2026 um 05:26 Uhr)
YouTube Security VideosMicrosoft Mechanics: A Copilot Agent Writes the Status Report(23.09.2026 um 03:30 Uhr)
IT Security NachrichtenSeite 2: Wesentlich ist wichtiger als wichtig | heise online(23.09.2026 um 03:06 Uhr)
IT Security NachrichtenNetBSD 10.2 security fixes close a remote kernel bug in ipfilter(23.09.2026 um 05:16 Uhr)
IT Security NachrichtenBurnout in der IT: das unterschätzte Sicherheitsrisiko(23.09.2026 um 05:08 Uhr)
IT Security NachrichtenActive Matter Review (PC)(23.09.2026 um 05:24 Uhr)
IT NachrichtenDarkwing Duck kehrt zurück zu Disney+(23.09.2026 um 05:26 Uhr)
YouTube Security VideosMicrosoft Mechanics: A Copilot Agent Writes the Status Report(23.09.2026 um 03:30 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

ใช้ git flow กันเถอะ

แนวคิดของ Git Flow Git Flow คือรูปแบบการจัดการ branch ที่เหมาะกับการพัฒนา software เป็นเวอร์ชันๆ โดยมี branch หลักๆ ดังนี้: Branch ใช้ทำอะไร main หรือ master เก็บ code ที่พร้อมขึ้น production develop เก็บ code ที่อยู่ระหว่างการพ…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

แนวคิดของ Git Flow

Git Flow คือรูปแบบการจัดการ branch ที่เหมาะกับการพัฒนา software เป็นเวอร์ชันๆ โดยมี branch หลักๆ ดังนี้:
































Branch ใช้ทำอะไร

main หรือ master
เก็บ code ที่พร้อมขึ้น production
develop เก็บ code ที่อยู่ระหว่างการพัฒนา (เตรียม release)
feature/* พัฒนา feature ใหม่
release/* เตรียม code สำหรับการ release
hotfix/* แก้ไข bug ด่วนจาก production


ขั้นตอนเริ่มใช้ Git Flow อย่างถูกต้อง



ติดตั้ง Git Flow (ครั้งเดียว)




# Mac (ผ่าน Homebrew)
brew install git-flow

# Ubuntu/Debian
sudo apt install git-flow

# Windows: ใช้ Git Bash แล้วติดตั้งผ่าน Git Extension หรือ Chocolatey
choco install git-flow-avh






ตอนเริ่มต้น: เตรียม branch

Checkout develop และดึงโค้ดล่าสุด




git checkout develop
git pull origin develop






📍 ทำบน: develop

📌 เพื่อให้แน่ใจว่า feature ใหม่ของคุณเริ่มจาก develop เวอร์ชันล่าสุด



สร้าง feature branch ด้วย Git Flow

เริ่มต้นใช้งานในโปรเจกต์



ไปยังโฟลเดอร์โปรเจกต์ แล้วพิมพ์:




git flow init






ระบบจะถามคุณว่าชื่อ branch ต่างๆ จะใช้ชื่ออะไร เช่น:




  • Branch สำหรับ production: main

  • Branch สำหรับ development: develop

  • Prefix สำหรับ feature branch: feature/

  • Prefix สำหรับ release branch: release/

  • Prefix สำหรับ hotfix branch: hotfix/



📌 กด Enter ใช้ค่า default ได้เลย เว้นแต่ทีมคุณมีการตั้งชื่อเฉพาะ



สร้าง feature branch ด้วย Git Flow




git flow feature start branch-name






📍 ทำบน: develop → feature/branch-name (Git Flow จะสลับให้อัตโนมัติ)

📌 สร้าง branch feature/branch-name จาก develop



สมมติว่าทำ login-page

ตอนพัฒนา: เขียนโค้ดและ commit



ทำงานบน feature/branch-name




git add .
git commit -m "feat(login page): สร้างหน้า login"






📍 ทำบน: feature/login-page

📌 เพิ่มไฟล์และ commit งานตามปกติ



Push ขึ้น remote เพื่อ backup / ร่วมงาน




git push -u origin feature/login-page






📍 ทำบน: feature/login-page

📌 ดัน branch นี้ขึ้น remote เพื่อให้คนอื่นเห็นหรือทำ PR ได้



ตอนจะ finish หรือ merge กลับ develop

ดึง develop ล่าสุดมารวมก่อน (ป้องกัน conflict ภายหลัง)




git checkout develop
git pull origin develop # ดึง develop ล่าสุด
git checkout feature/login-page
git rebase develop # รวม develop เข้ามาใน feature






📍 ทำบน: feature/login-page

📌 เพื่อให้แน่ใจว่า feature ของคุณ up-to-date กับ develop และดู conflict ตั้งแต่ตอนนี้



❗ ถ้ามี conflict ตอน git rebase develop

แก้ไฟล์ที่ conflict ด้วย editor



เมื่อแก้เสร็จ:




git add .
git rebase --continue






(ทำซ้ำถ้ามี conflict หลายจุด)



Push หลังจาก rebase แล้ว (ต้องใช้ --force หรือ --force-with-lease)




git push --force-with-lease






📍 ทำบน: feature/login-page

📌 เพราะ rebase จะเปลี่ยนประวัติ commit ต้อง force push ขึ้น remote



ตอนจบ: merge feature กลับ develop



Finish ด้วย Git Flow (หลัง rebase และ push เสร็จแล้ว)




git flow feature finish login-page






📍 ทำบน: feature/login-page

📌 จะ merge เข้ากับ develop และลบ feature branch



Push develop ขึ้น remote




git push origin develop






📍 ทำบน: develop

📌 ดันโค้ดล่าสุดขึ้น remote



สรุป Workflow ทั้งหมด




# เริ่ม
git checkout develop
git pull origin develop
git flow feature start login-page

# ทำงาน
# --> เขียนโค้ด -->
git add .
git commit -m "feat: หน้า login"
git push -u origin feature/login-page

# ก่อน merge กลับ
git checkout develop
git pull origin develop
git checkout feature/login-page
git rebase develop # รวม develop ล่าสุด

# ถ้า conflict: แก้ + commit
git add .
git rebase --continue

# หลัง rebase
git push --force-with-lease

# Finish
git flow feature finish login-page
git push origin develop






อธิบายคำสั่งสำคัญ































































คำสั่ง ใช้ทำอะไร ใช้ตอนอยู่ที่ branch
git flow feature start สร้าง branch feature develop
git add . เพิ่มไฟล์ทั้งหมดเข้าสู่ staging feature/*
git commit -m commit งาน feature/*
git push -u origin feature/* ดัน branch feature ไป remote feature/*
git pull origin develop ดึง develop ล่าสุด develop
git rebase develop รวม develop เข้ามาใน feature (clean history) feature/*
git rebase --continue ดำเนินการ rebase หลังแก้ conflict feature/*
git push --force-with-lease push หลัง rebase (force แบบปลอดภัย) feature/*
git flow feature finish merge เข้า develop + ลบ branch feature/*
git push origin develop push develop ที่ merge แล้ว develop


สรุป Git Flow Feature Branch พร้อม branch ปัจจุบัน


















































ขั้นตอน คำสั่ง อยู่ที่ branch อธิบาย
1. เริ่ม feature ใหม่ git checkout develop develop เตรียมตัวก่อนเริ่ม feature
git flow feature start ชื่อ develop → feature/ชื่อ-feature สร้างและสลับไป branch feature
2. ทำงานแก้โค้ด
git add . + git commit
feature/ชื่อ-feature commit โค้ดใน feature branch
3. (ถ้ามี) push ขึ้น remote git push -u origin feature/ชื่อ feature/ชื่อ-feature ส่ง branch feature ขึ้น remote
4. จบ feature และ merge กลับ git flow feature finish ชื่อ feature/ชื่อ-feature → develop merge เข้า develop, ลบ feature, สลับไป develop
5. push develop กลับ remote git push origin develop develop ส่ง develop branch ล่าสุดขึ้น remote
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten ใช้ git flow กันเถอะ

Thematisch verwandte Begriffe: flow, กนเถอะ · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-17636 | IBM Financial Transaction Manager (FTM) for RedHat OpenShift could allow…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick