Src refspec ~ doesn't match

Hi, I want to push something to a specific remote branch

I do local areas

git clone https://~~~.Something cd https://~~~.Something 

and I can access a specific branch using

 git checkout origin/[branch] 

I want to commit something in my specific branch / [branch] But when I try to push something using

 git push origin [branch] 

I got this error

 error: src refspec [branch] does not match any. error: failed to push some refs to 'https://github.com/kkammo/yonseitree.git' 

I tried to solve this problem, but I can not find a solution ... so plz help me TT

+7
git git-checkout clone push
source share
2 answers

The replicated question here is src refspec master doesn't match anyone when clicking commit in git

Try git show-ref see what links you have. Are there any refs / heads / [branch] links?

You can try git push origin HEAD:[branch] as a more locally-independent solution.

This works for me.

+33
source share

Below is your branch:

* dev master remotes/origin/master

A new dev branch is created from the wizard and some commit has been performed.

Use the following command to push this new branch:

git push -u origin --tags HEAD:dev

After that, we will check again:

* dev master remotes/origin/dev remotes/origin/master

It is good for me.

0
source share

All Articles