Failing miserably at the Excursion exercise


#1

https://www.codecademy.com/courses/freelance1-u3/projects/f1-excursion?program_content_id=3ed6f64c9736ea1d2bef2fdd457c287f&program_id=fb16da307e82259e33268848a624db9c

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 https://github.com/Astonmartina/excursion-2
charlotersimac2:css charlottechamier$ git push -u origin master
To https://github.com/Astonmartina/excursion-2
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/Astonmartina/excursion-2
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.


#2

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)


#3

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


#4

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!


#5

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