How to update Github repository after having changed files locally in Git?

4

After creating a repository in Github and uploading some files to this repository, I needed to make some changes to the file, I did the commits , but I do not know how to send those changes to Github. p>

How do I do this?

    
asked by anonymous 21.12.2014 / 02:09

1 answer

7

It seems to me that your problem is very simple, you just need to know the right command to send that is push :

git push

It has numerous variations but it solves the basics alone. Of course, commit must be correct to work properly and your local repository also needs to be properly configured to work with Github.

Github Documentation .

If the connection to Github has not yet been established you can do this (the first time):

git remote add origin [email protected]:usuario/nomerepositorio.git

Unless you have created the local repository with git clone there is only needed (the first time):

git push origin master

Source: answer in SO .

See a diagram that Oliver Steele created:

    
21.12.2014 / 02:11