Patricio Treviño

Patricio Treviño

Husband . Father . Developer
3total entries in remote

Delete a local and remote git branch using the terminal

Syntax

git branch <[-dr | --delete --remotes]> <remote>/<branch>
view raw syntax.text hosted with ❤ by GitHub

Option Description
remote The remote to be used.
branch The remote branch to be deleted.

Note: valid options are:
-dr, is a synonym of --delete --remotes
--delete, deletes the local branch with no pending merges.
--remotes, tells git to delete the remote tracking branch too.

Delete a remote git branch using the terminal

Syntax

git push <remote> --delete <branch>
view raw syntax.text hosted with ❤ by GitHub

Option Description
remote The remote to be used.
branch The remote branch to be deleted.

Prunes the repository from deleted remote branches using the terminal

Syntax

git fetch [remote] [-p | --prune]
view raw syntax.text hosted with ❤ by GitHub

Option Description
remote The remote to be used (defaults to origin).