Failing miserably at the Excursion exercise

On the Learn the Command Line exercise for Excursion. All OK up until point 6 which says: " Let’s set up a remote GitHub repository. Go to GitHub’s homepage to make a new repository. Call it excursion. Follow the instructions to add an existing Git repository, since you have already initialized yours on your own computer."

But I cannot find the GitHub page that allows me to add an existing Git repository - only the option to Create a new one. After it just gets progressively pear-shaped. I cannot find the page on GitHub with the options to connect existing work, which I know exists because I’ve made notes on it. So I created a new repository on GitHub and tried a push anyway. Unsurprisingly it was rejected with the following:

git remote add origin
charlotersimac2:css charlottechamier$ git push -u origin master
! [rejected] master -> master (fetch first)
error: failed to push some refs to ‘
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., ‘git pull …’) before pushing again.
hint: See the ‘Note about fast-forwards’ in ‘git push --help’ for details.
charlotersimac2:css charlottechamier$

Worst of all I am now so tired and befuddled that I can’t even work out how to get a screenshot of the terminal into this - and have had to cut/paste the bit above, sorry.

Any pointers would be really appreciated. Thanx.

You’d simply push to an empty repository. Yours isn’t empty though, it has a commit in it. You’ll have to decide what you want to do with that existing commit, perhaps it should be discarded (delete the repository and create it again, leaving you with an empty repository)

1 Like

Your commit looks a lot like it was made by github - you probably didn’t create an empty repository, you probably checked some box asking github to add a readme

1 Like

Hi ioatan - Yes, I did add a readme. I will start again tomorrow and recreate it without the empty and hopefully I’ll then be able to move on. Thank you for your help!

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