How to push my changes back to the source code in git

I forked a project in github and then did a git clone on this project to get all the source code to my machine.

I have made some modifications to the source code and my questions are:-

  • How to commit my changes to the local git repository as well as my forked repository in github?
  • How will the author of the original source code, pull my changes from the forked repository in github

  • How to commit my changes to the local git repository as well as my forked repository in github?
  • To add files changes for commit, use the following command.

    git add .
    

    then, make a local commit by

    git commit
    

    once you make your local commit, you can then push it to your remote GitHub fork.

    git push
    
  • How will the author of the original source code, pull my changes from the forked repository in github
  • To make your source code pulled by original fork, you have to send a pull request to the project owner.

  • Go to the web page of your forked project on GitHub.
  • Hit the pull request button on the top right of page
  • Select the commits that you want to submit by change commits button.
  • Write some description of your changes, comments, or etc.
  • Send pull request and wait for the owner reply.

  • Check this
    Using GIT, how can I selectively pull / merge changes from another's 'fork'?
    How to commit my changes to the local git repository
    git commit -m "Your Message"

    How to commit my changes in forked repository in github? http://www.backdrifter.com/2011/02/09/working-on-forked-projects-using-github/
    http://help.github.com/fork-a-repo/

    How will the author of the original source code, pull my changes from the forked repository in github
    How do I show the changes which have been staged?
    http://www.kernel.org/pub/software/scm/git/docs/git-pull.html
    http://www.kernel.org/pub/software/scm/git/docs/everyday.html

    链接地址: http://www.djcxy.com/p/50880.html

    上一篇: 在做git commit时发出警告

    下一篇: 如何将我的更改推回到git中的源代码