Git programming "push" command

For some reason i can’t get half of these questions though I’ve just tried forever and finally got it, its really annoying. I cant figure out how to “push” my branch to “sally” Though I’ve tried

$ git push origin my-quizzes
error: src refspec my-quizzes does not match any.
error: failed to push some refs to ‘/home/ccuser/workspace/curriculum-a/science-quizzes’

That’s all that happens. can someone help me!

You need to specify which repository to push to and which branch to push. origin is the other repository, and you can get a list of your branches and see which is your current one by entering git branch

This answer looks good - but doesn’t work.

You are working in the my-quizzes local folder but the branch is called something else.

Check on you branch to push to the origin.

$git branch

[examine the output, the branch you want to push is listed there]

$git push origin [the branch you were working on]

I struggled with this question as well. Good luck!

Skip cd my-quizzes Just put in $ git push origin bio-questions master This will get you past this glitch. It took me a few hours to figure this out.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.