Click the Fork button near the top right of the repo’s GitHub page.
This will either create a new fork in your own GitHub account, or prompt you to choose an account if you have more than one. In either case, make a note of where the fork is created! In this document we’ll reference your fork’s URI as upstream. Example: https://github.com/Digital-Grinnell/ISLE-Drupal-Build-Tools
Find and open the Issues tab (its icon is an exclamation point in a circle) near the top of the page.
Look through the list of all issues, both Open and Closed, for any mention of the problem you wish to solve.
If you find an existing issue, study it and determine if you can add your work to the existing issue.
If an appropriate existing issue is not found, click New issue to create one and describe the problem you will be attacking.
Take note of the new, or existing, sequential number assigned to your issue. In subsequent steps you should refer to your issue using its number (Example: #20) in references like these examples: #20, issue-20.
Create your branch and check it out.
Create a branch with: git branch <helpful and identifying name>. Example: git branch issue-20
Checkout your new branch with git checkout <helpful and identifying name>. Example: git checkout issue-20
Start your work and commit locally, aka “save your work”, at times (probably more than once) that feel logical.
Create logical checkpoints (i.e., commits) when you feel you’ve finished on a particular “part” of your work. Example: You’ve just created a new file and added some stubbed content: Commit it!
Commits are references in your work and can be helpful if you need to go back to an earlier version of your work, sort of like an “undo” command. By committing regularly, you give yourself utmost flexibility and it’s a good practice/habit.
In terminal/shell/powershell/cmd enter git status to see a list of files changed, added, and removed.
Use git add <file> or git rm <file> to stage (add or remove) files from your commit. If you want to add all files to the commit you may shorthand it with git add -A; the -A flag is short for “All”.
Create your commit after files are staged: git commit. Enter a commit message that is helpful for you and us! Helpful hint: Always write in the present tense: “Update <somefile.ext> to include all of the appropriate modules.”
Continue your work, going through this step as many times as needed.
Finalizing and preparing for a pull request (PR)
Pushing back to origin will update your fork in GitHub.
After your final commit and feel you’re ready to PR back to the project: git push origin <name-of-your-branch>.
Visit your forked GitHub repo and switch branches to your new branch.
Select New pull request (top-left) and tell GitHub, if it isn’t already, to compare against remote branches. Select the original/canonical master first, then your repo and branch.
Create the pull request (PR) and send it.
Enter a description of what your commits do as a whole.
How should this be tested?
Who should be notified? @mention them if you know.
Is there anything else we should know before we review and test your work?
With your description complete click the Create Pull Request button and you’re done! Thank you!