Playing with GitHub Pull Requests (PR)
Playing with forks and pull requests. Fork this repo, clone, say hi in a new file, push and submit pull request from your GitHub accout.
- Check that you are logged in in GitHub
- Click the upper rigth
Fork
button. Af you do it you will be taken to your own account, to your forked repositry. Under the repository name (<YOUR_USERNAME>/sayhy), you will see the text: "Forked from iamc/sayhi". - Go to your computer and
clone
YOUR fork (<YOUR_USERNAME>/sayhi) (green button, code clone, select https and copy-paste to your terminal) - Create a new file <YOUR_USERNAME.txt> and put some text sayinghi, and
git add
,commit
the file in your local repository. - Push your local repo to GitHub remote repo with
git push origin master
- Now in GitHub web interface you will see something like "This branch is XX commit ahead of iamc:master.", and in the same "bar" the text
Pull request
. Click there, go through the webpage that appears (the "send" Pull Request page, it has a lot of info you can mostly ignore about branches, etc), and click the green buttonCreate a pull request
. - Now I (iamc) will get a message about your PR submissionn. As your username is unique in GitHub, and you so named the new file, there will be n o conflict with my repositry; I'll review your PR and accept it. This will be reflected in your forked repo and this will habe been your first pull request ever and your first step into the open source contribution Hall of Fame.
Enjoy!