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
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
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 calledorigin/dev
, the commandwill indeed do what you want. To be clear, this command will
origin/dev
that lives in theorigin
remote repo, and which is associated with your (local) remote-tracking branchorigin/origin/dev
.dev
that lives in theorigin
remote repo, and which is associated with your (local) remote-tracking branchorigin/dev
.