Reputation: 1366
I have two remote branches:
origin/dev
origin/origin/dev
I want to delete origin/origin/dev
.
Will the following command do what I want?
git push origin --delete origin/dev
Upvotes: 0
Views: 28
Reputation: 66284
You would do well to pick better branch names; you would avoid a few headaches like this one :)
As I understand it, you have two branches living in the remote repo called origin
:
dev
origin/dev
A quick test in a toy repo indicates that, under the assumption that origin/HEAD
doesn't point to the remote branch called origin/dev
, the command
git push origin --delete origin/dev
will indeed do what you want. To be clear, this command will
origin/dev
that lives in the origin
remote repo, and which is associated with your (local) remote-tracking branch origin/origin/dev
.dev
that lives in the origin
remote repo, and which is associated with your (local) remote-tracking branch origin/dev
.Upvotes: 1