---
title: "ลบ git branch ที่ merge ไปแล้ว"
description: "คำสั่ง git สุดสะดวกสำหรับลบ local git branch ทั้งหมดที่ merge ไปแล้ว git branch --merged | egrep -v \"(^\\\\|master|dev)\" | xargs git branch -d*"
canonical: https://oozou.com/til/delete-merged-git-branches-51
locale: th
date: 2020-10-13
topic: shell
---

# ลบ git branch ที่ merge ไปแล้ว

> คำสั่ง git สุดสะดวกสำหรับลบ local git branch ทั้งหมดที่ merge ไปแล้ว git branch --merged | egrep -v "(^\\|master|dev)" | xargs git branch -d*

Published: 2020-10-13 · Topic: [shell](https://oozou.com/th/til-topics/shell) ([markdown](https://oozou.com/th/til-topics/shell.md))

คำสั่ง git สุดสะดวกสำหรับลบ local git branch ทั้งหมดที่ merge ไปแล้ว
*git branch --merged | egrep -v "(^\\*|master|dev)" | xargs git branch -d*

---

Contact OOZOU: hello@oozou.com · +66 2544 0000 · https://oozou.com/th/contact

More for AI agents: https://oozou.com/llms.txt · every page has a markdown twin at its URL plus ".md"
