Reputation: 26392
Is running a command like $ git push origin :remote-branch
a shortcut for git push <remote-name> --delete <remote-branch-name>
Upvotes: 0
Views: 1314
Reputation: 4476
Yes. From man git-push
:
The format is git push <repository> <refspec>
, with <refspec>
described as follow:
<refspec> Specify what destination ref to update with what source object. The format of a <refspec> parameter is an optional plus +, followed by the source object <src>, followed by a colon :, followed by the destination ref <dst>.
Then:
Pushing an empty
<src>
allows you to delete the<dst>
ref from the remote repository.
Upvotes: 3