Tag: remote branch
-
![How to Delete Git Branches: Local & Remote (With Commands) [2026]](https://wp.keploy.io/wp-content/uploads/2024/11/b5089871-5788-43a0-bbb5-a53216f915be.png)
How to Delete Git Branches: Local & Remote (With Commands) [2026]
Key Takeaway: To delete a local Git branch, use git branch -d branch-name (safe) or git branch -D branch-name (force). To delete a remote branch, use git push origin –delete branch-name. Always ensure the branch has been merged before deleting, and use git fetch –prune to clean up stale remote-tracking references. TLDR; Deleting a Local…