You might be getting and error like...
error : src refspec test does not match any.
fatal : The remote end hung up unexpectedly
error : failed to push some refs to 'git@github.com: {username}/{projectname}.git'
So, In this post we will try to fix this error, we have some solution regarding 'error : src refspec test does not match any'. So, lets list down the solutions..
If this also doesn't worked out for you, lets move to 2nd solution.
git push origin HEAD:master
OR
git push origin "your_git_repo":"your_branch_name"
OR
git push origin master --force
So these three solution will surely make your "git push" work but if it doesn't just check that you are trying to push a specific branch in local to a specific branch in remote. This error will also come when you are in a specific branch and try to push another that do not exist yet.
Please Like and Share the Blog, if you find it interesting and helpful.
error : src refspec test does not match any.
fatal : The remote end hung up unexpectedly
error : failed to push some refs to 'git@github.com: {username}/{projectname}.git'
So, In this post we will try to fix this error, we have some solution regarding 'error : src refspec test does not match any'. So, lets list down the solutions..
Solution 1 :
At first just try to commit all the files before pushing it into the github. This error will come when you haven't committed the files and tried to push to the github.If this also doesn't worked out for you, lets move to 2nd solution.
Solution 2 :
If you are working with branches and getting this error then might be you are not refrencing to the correct branch. Refspec are always in the form source:destination, so the error is telling you that might be something is wrong with your source part. If you are doing a spelling mistake or changing the case of the branch, you will get this error because branch names are case-sensitive.Solution 3 :
If above two solution doesn't worked for you then you can try using :git push origin HEAD:master
OR
git push origin "your_git_repo":"your_branch_name"
OR
git push origin master --force
So these three solution will surely make your "git push" work but if it doesn't just check that you are trying to push a specific branch in local to a specific branch in remote. This error will also come when you are in a specific branch and try to push another that do not exist yet.
Please Like and Share the Blog, if you find it interesting and helpful.
Wohh precisely what I was searching for, thank you for posting.
ReplyDeleteI like this internet site because so much useful material on here :D.
ReplyDeleteI really enjoy examining on this website, it contains excellent posts.
ReplyDeleteVery good article. I'm facing many of these issues as well..
ReplyDeleteSome truly rattling work on behalf of the owner of this website, utterly great content.
ReplyDeleteI like this internet site because so much useful stuff on here :
ReplyDeleteD.
For hottest news you have to visit world wide web and on the
ReplyDeleteweb I found this web site as a most excellent web page for latest
updates.
Thanks a lot for being my own mentor on this matter.
ReplyDeleteI enjoyed the article very much and most of all enjoyed
reading how you handled the issues I widely known as controversial.
You happen to be always very kind to readers really like me and let
me in my lifestyle. Thank you.
Hi, i think that i saw you visited my site so i came
ReplyDeleteto ?return the favor?.I'm trying to find things to enhance my site!I suppose
its ok to use some of your ideas!!
hello there and thank you for your info ?
ReplyDeleteI have certainly picked up something new from right here.
I did however expertise several technical points using this website, since I experienced to reload the website lots of times previous to I could get it to load correctly.
I had been wondering if your hosting is OK? Not that I'm complaining, but sluggish loading instances times will sometimes affect your placement
in google and could damage your high-quality score
if ads and marketing with Adwords. Anyway I'm adding
this RSS to my e-mail and can look out for much more of your respective
interesting content. Ensure that you update this again very soon.
I definitely wanted to develop a simple word so as to thank you for those splendid tips
ReplyDeleteyou are showing here. My long internet investigation has at the
end of the day been paid with good knowledge to write about with my friends and classmates.
I would repeat that most of us website visitors actually are quite fortunate to exist in a wonderful site with very many special people with valuable tricks.
I feel very grateful to have seen your weblog and look forward to plenty
of more brilliant times reading here. Thanks a lot
once again for everything.
Hi, Neat post. There's a problem with your website in internet explorer, could check this?
ReplyDeleteIE nonetheless is the market chief and a huge section of other
people will leave out your great writing due to this problem.
I'm still learning from you, but I'm making my way to the top as well.
ReplyDeleteI definitely enjoy reading everything that is written on your website.Keep the aarticles coming.
I loved it!
Respect to article author, some wonderful selective information.
ReplyDelete