Delete GIT local and remote branches from command line
I’m always struggeling deleting remote GIT branches from the command line (in my case PowerShell
).
Deleting the local branch is a no-brainer:
git branch -d branchName
If you’ve to force deletion (which GIT will tell you via git status
) you can use -D
parameter.
Deleting the corresponding remote branch is done via a git push
command. In detail:
git push --delete origin branchName
Hope that helps.