#How to work on your own fork
Let's assume you belong to an organization called justiceleague
and that you're supposed to submit code to the earth
repository. Since I am batman
, I do it like this:
- Go to
https://github.com/justiceleague/earth
and click on thefork
button on the top right corner. Wait until github completes the copy. - Now, it's time to
clone
the repository and to add both remotes.
git clone [email protected]:justiceleague/earth.git -o upstream
cd earth
git remote add origin [email protected]:batman/earth.git
- This way, you can upload your progress to your own fork as a
branch
(without polluting the organization's repository).
git checkout -b mybranch upstream/master
# get work done
git add -A
git commit -m "My awesome changes"
git push origin mybranch
# ready to create PR!
- Finally, you can go to
https://github.com/justiceleague/earth
to create your PR!