Skip to content

Instantly share code, notes, and snippets.

@elfrank
Created December 10, 2014 06:19
Show Gist options
  • Save elfrank/d6e03369a29894c8bafe to your computer and use it in GitHub Desktop.
Save elfrank/d6e03369a29894c8bafe to your computer and use it in GitHub Desktop.
How to work on your own fork

#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 the fork 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 git@github.com:justiceleague/earth.git -o upstream
cd earth
git remote add origin git@github.com: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!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment