You can delete a git branch locally and remotely using git branch command.
Delete a local git branch:
1 2 3 |
git branch -d #or git branch -D |
The -d option is an alias for –delete, which only deletes the branch if it has already been fully merged in its upstream branch.
The -D option is an alias for –delete –force, which deletes the branch irrespective of its merged status.
Delete a remote git branch:
1 2 3 |
git push #or git push |