Help! Deploy Website 6/7


#1

I'm having a problem the instructions say :
It's time to deploy your site!

Once again, we'll use Git to help deploy your site. This time, we'll use Git's push command and push the contents of your site up to your repo using the following command:

git push -u origin master

So I type in that ^ into the terminal and it gives me an error saying
error: src refspec master does not match any.
error: failed to push some refs to 'https://github.com/TravisDallas98/TravisDallas98.github.io.git'

If I could get some help that'd be great, Thanks!


#2

What are you trying to push? Have you made any commits? Otherwise it wouldn't make sense to push would it

git log lets you view commits


#3

Well now since I closed everything out, I'm getting new errors

$ git push -u origin master
fatal: Not a git repository (or any of the parent directories): .git

Then I tried to go back and put the commands back in and it says

cd personal website
bash: cd: personal: No such file or directory


#4

I typed in this and this is what I got...

cd personal website
bash: cd: personal: No such file or directory
$ git init
Initialized empty Git repository in /home/ccuser/workspace/daw/.git/
$ git remote add origin https://github.com/TravisDallas98/TravisDallas98.github.io.git
$ git remote rm origin
$ git remote -v
$ git add .
$ git commit -m "Save my work"
[master (root-commit) d62802d] Save my work
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 .cc
$ git push -u origin master
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

used git log this is what I got

git log
commit d62802d3e2b66ae6ede069c00cc34c742b3d15bd
Author: codecademy ccuser@codecademy.com
Date: Sun Mar 5 18:45:14 2017 +0000

Save my work

Thanks


#5

Not sure what you're asking, but git/other commands are giving you lots of feedback on what's wrong about the things you're typing.

For example, you added an url as a remote named origin, when trying to push to it it said that doesn't seem to be a git repository - if you type that url into a browser, you'll get a 404 not found - so no, that isn't a git repository

Also, you created a new repository in a new location and added whatever files happened to be there, so I wouldn't expect that to be a valid website. The idea was to use jekyll to generate a website, create a repository in that location, commit it, push it. You probably still have that website directory in your file system, so the next thing to do would be to navigate there and make sure there's a commit and that the right remote is added, then push


#6

Well how would I do that?


#7

Those are all actions covered in the course! Refer back to where they were described and/or describe the action you want to know how to do to uncle google

The way all of this works is by first getting an understanding of the involved concepts, then decide what you want to change about the current state, then look up how to make that change. Usually the looking up is either in the manual page for a program that you know does what you want, or by googling the action.

Any error messages you get are also good search queries if they aren't quite making sense with your current understanding of the situation. Usually these messages say a lot about what you want to change - they can't tell you what you would want to do, but they can tell you what was wrong about what you wrote, allowing you to adjust that part


#8

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