git delete local branch, how to delete branch git cli

PHOTO EMBED

Tue Dec 13 2022 06:24:01 GMT+0000 (Coordinated Universal Time)

Saved by @tofufu #shell #bash #git

# Delete remote branch
git push origin -d remote_branch_name

# Delete local branch
git branch -d local_branch_name

# Force delete if getting merge error
git branch -D local_branch_name
content_copyCOPY

https://www.freecodecamp.org/news/git-delete-branch-how-to-remove-a-local-or-remote-branch/