Recently, I have started to work on an existing open source project in GitHub.
Assumption: you have set up git locally and have an account on Github
Forking creates a copy of the other person's Github project under your own Github account. To fork, navigate to their Github project page 'https://github.com/TheirUsernameXYZ/ProjectNameABC' and click 'fork' and follow the instructions.
You should automatically be navigated to your new Github page for the repository:
You need to create a local copy of your own fork by executing 'git clone <your clone url>' at the command line.
Pull requests are used when you make changes to your copy of their repository ie you have made local changes and commit them to git. You generate a pull request to say to the original owner of the project 'Hey, I've made some commits on my copy of your project. Why don't you review these changes and merge them onto your original branch'.
Navigate to your own project page:
Click on 'Pull Requests' and follow the instructions
\o/ woohoo you have contributed to another project.
The next post details how you keep your fork up to date by merging any commits they make to their original branch.
Assumption: you have set up git locally and have an account on Github
Forking someone else's project
Step 1: Forking
Forking creates a copy of the other person's Github project under your own Github account. To fork, navigate to their Github project page 'https://github.com/TheirUsernameXYZ/ProjectNameABC' and click 'fork' and follow the instructions.
You should automatically be navigated to your new Github page for the repository:
https://github.com/YourName/ProjectNameABC
Step 2: Clone your own fork
You need to create a local copy of your own fork by executing 'git clone <your clone url>' at the command line.
Generating a pull request
Pull requests are used when you make changes to your copy of their repository ie you have made local changes and commit them to git. You generate a pull request to say to the original owner of the project 'Hey, I've made some commits on my copy of your project. Why don't you review these changes and merge them onto your original branch'.
Step 1: Open your project
Navigate to your own project page:
https://github.com/YourName/ProjectNameABC
Step 2: Create a new pull request
Click on 'Pull Requests' and follow the instructions
\o/ woohoo you have contributed to another project.
The next post details how you keep your fork up to date by merging any commits they make to their original branch.
No comments:
Post a Comment