Reputation: 9686
I have repository in GitHub. I edited files in my PC, committed them and now I want to push these files to GitHub. How can I do it?
Upvotes: 1
Views: 9961
Reputation: 57690
If the files are already cloned from a github repository git push
will do it.
cd /path/to/repo
git push
If this local repo does not belong to any github repo, create a repository in github. This will give you a git repo url like git://github.com/username/project.git
. Now you need to add this url as remote to your existing local repository
cd /path/to/repo
git remote add origin git://github.com/username/project.git
Then you can commit your changes and push it
git push
Upvotes: 5
Reputation: 61497
Go to github and create a repository under your account (if you haven't already). If you've done that, follow the instructions for pushing code from an already existing repository.
Upvotes: 0