详见 github
Contribute to other project
- Fork it
- Create your feature branch
$ git checkout -b my-new-feature
- Commit your changes
$ git commit -am 'Added some feature'
- Push to the branch
$ git push origin my-new-feature
- Create new Pull Request (on github website)
Syncing a fork from remote
- List the current configured remote repository for your fork
$ git remote -v
- Specify a new remote upstream repository that will be synced with the fork
$ git remote add upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git
- Verify the new upstream repository you've specified for your fork
$ git remote -v
- Fetch the branches and their respective commits from the upstream repository
$ git fetch upstream
- Check out your fork's local master branch
$ git checkout master
- Merge the changes from upstream/master into your local master branch
$ git merge upstream/master
- Sync to you own github repositoriy
$ git push origin master