LinuxCommandLibrary

git-delete-branch

Delete local and remote Git branches.

TLDR

Delete a local and remote Git branch

$ git delete-branch [branch_name]
copy


Delete multiple local and remote Git branches
$ git delete-branch [branch_name1 branch_name2 ...]
copy

SYNOPSIS

git-delete-branch <branchname>

DESCRIPTION

Deletes local and remote branch named <branchname>. Note that local deletion fails if the branch is checked out.

OPTIONS

<branchname>

The name of the branch to delete. If multiple branches are provided, then they will all be deleted.

EXAMPLES

$ git delete-branch integration
$ git delete-branch integration bug/1234

REPORTING BUGS

<https://github.com/tj/git-extras/issues>

SEE ALSO

<https://github.com/tj/git-extras>

AUTHOR

Written by Tj Holowaychuk <tj@vision-media.ca>

Copied to clipboard