Step 1: Fork the repo.
Step 2: Clone your fork locally.
git clone https://github.com/USERNAME/REPO.git
Or
[email protected]:USERNAME/REPO.git
if you want to clone using SSH.
NOTE: Replace
USERNAME
with YOUR GitHub username andREPO
with the name of the repo.
Step 3: Set the upstream
remote to the original repo.
This step is essential if you plan on contributing regularly, as it let's you easily pull new commits from the original repo into your fork.
git remote add upstream https://github.com/ORGANIZATION/REPO.git
NOTE:
ORGANIZATION
should be set to the username/organization name of the ORIGINAL repo.
Step 1: Pull recent updates from the original repo.
git checkout master # if not already on master
git pull --rebase upstream master
git push
Now if you visit your fork of the project on GitHub, it should say that your master branch is up-to-date with the original master branch.
Step 2: Create a new branch to work on your fix/improvement/feature.
git checkout -b BRANCH
Step 3: Write some awesome, well-documented code.
(Too bad there's not a git command for that)
Step 4: Create the PR.
Depending on who the admins are and what they expect, you may also want to rebase your commits. But this usually isn't necessary since the admins can always squash commits when they merge the PR.