3total entries in remote
Delete a local and remote git branch using the terminal
Syntax
git branch <[-dr | --delete --remotes]> <remote>/<branch> |
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> |
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] |
Option | Description |
---|---|
remote | The remote to be used (defaults to origin). |