Reputation: 37317
There are two ways to delete a remote branch in Git:
git push -d remote branch
git push remote :branch
I wonder if there's any difference. Per my understanding, the first command explicitly tells Git to delete a branch (-d
is short for --delete
), and the second command is a specific form of push remote [[+]ref:]ref
, but that doesn't explain the differences, if present.
Upvotes: 2
Views: 1976
Reputation: 30966
They are the same. It's explained in git-push Documentation.
-d
--delete
All listed refs are deleted from the remote repository. This is the same as prefixing all refs with a colon.
Upvotes: 3