Commands to upload files to github

5

I'm trying to upload files to GitHub. I already created the directory and in GitHub I created the account.

I can not establish a connection with GitHub when I enter the folder where it contains the file that I want to host and I type these codes below:

git init
git add --all
git commit -m 'Teste de github'
git remote add origin [email protected]:usuario/repositoriogithub.git
git push origin master

The last two commands fail because they can not establish a connection to the server.

Possibly it should be because of the ssh key that I did not configure in the installation because I do not even know where that keys are. My operating system is Windows XP SP3, do you know where this ssh key is and how to configure it on the website and Windows?

Note: I already have the repository created, but I can not send my files to GitHub.

    
asked by anonymous 31.05.2015 / 19:14

1 answer

5

If the repository already exists, it is easier to use git clone

git clone [email protected]:usuario/repositoriogithub.git

Ready. Make the necessary changes. To upload the files you need to do the following:

git add *
git commit -m 'Sua mensagem de commit'
git push -u origin master

Ready.

    
30.06.2015 / 01:08