LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

git-delete-branch

Delete both local and remote branches

TLDR

Delete local and remote branch
$ git delete-branch [branch]
copy

SYNOPSIS

git delete-branch branch

DESCRIPTION

git delete-branch deletes a branch both locally and on the remote in a single command. Part of the git-extras collection, it simplifies branch cleanup by combining what would normally require separate git branch -D and git push origin --delete operations.The command is particularly useful in pull request workflows where feature branches become obsolete after merging. Multiple branches can be passed and will each be deleted in turn.

PARAMETERS

branch

Name of the branch to delete locally and remotely.

INSTALL

sudo apt install git
copy
sudo dnf install git
copy
sudo pacman -S git
copy
sudo apk add git
copy
sudo zypper install git
copy
brew install git
copy
nix profile install nixpkgs#git
copy

CAVEATS

Requires git-extras to be installed. Remote deletion requires push access to the remote. Local deletion uses -D (force), so unmerged work can be lost.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid