I tried creating remote branch devel using:
git push origin origin:refs/heads/devel
But it fails with:
error: src refspec devel does not match any.
error: failed to push some refs to 'git@***.com:***/abcd.git'
What’s going on?
EDIT:
I am following: This Tutorial
If devel is your local branch, then this is sufficient:
Your example doesn’t work, because you try to push “origin” branch to remote repository (“origin”), but you don’t have branch named “origin” (first origin here) in local repository.
You can run:
This second form is preferred if you local branch name should differ from remote branch name.