You can't push into other people's repositories. This is because push permanently gets code into their repository, which is not cool.
What you should do, is to ask them to pull from your repository. This is done in GitHub by going to the other repository and sending a "pull request".
There is a very informative article on the GitHub's help itself: https://help.github.com/articles/using-pull-requests
To interact with your own repository, you have the following commands. I suggest you start reading on Git a bit more for these instructions (lots of materials online).
To add new files to the repository or add changed files to staged area:
$ git add <files>
To commit them:
$ git commit
To commit unstaged but changed files:
$ git commit -a
To push to a repository (say origin
):
$ git push origin
To push only one of your branches (say master
):
$ git push origin master
To fetch the contents of another repository (say origin
):
$ git fetch origin
To fetch only one of the branches (say master
):
$ git fetch origin master
To merge a branch with the current branch (say other_branch
):
$ git merge other_branch
Note that origin/master
is the name of the branch you fetched in the previous step from origin
. Therefore, updating your master branch from origin is done by:
$ git fetch origin master
$ git merge origin/master
You can read about all of these commands in their manual pages (either on your linux or online), or follow the GitHub helps:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…