terminal
cd C:/Users/<your_username>/Projects
Frank Aragona
February 1, 2023
March 10, 2025
You will need Git and Github to make code contributions:
There are multiple ways to contribute to a Github repo, whether it is to report a bug, request a feature, or actively contribute to the code base.
To report a bug,
click on a repo and click on the Issues
tab.
click the New issue
button
click on the Bug Report
tab
From here you will need to fill out the bug report along with steps to reproduce the behavior you’re seeing.
Do you have a feature that you want included in the code base?
click on a repo and click on the Issues
tab.
click the New issue
button
click on the Feature Request
tab
From here you will need to fill out the feature request along with details
There is a discussions tab in our Github org. You can start discussions, ask questions, and share ideas here.
To contribute to a public repo in our Github org, please contact the repo owner to request read/write access. If you want to create a repo in the org, please contact frank.aragona@doh.wa.gov
.
Before contributing any code, please read our security policies and collaboration guide. There you will find our repo rules and instructions on how to set up pre-commit hooks and contributing how to contribute code.
Once granted access, follow the steps below to create a repo (Section 5) and/or collaborate on code (?@sec-collab).
Please see our tutorial for more details.
Once granted access to create a repo, you can go to our org and click Repositories > New repository
or click here
This will take you to the Create a new repository
screen. Please follow these instructions when filling it out:
Consider using a template unless you want to develop a repo from scratch. We have pre-built R, Python, and base templates that have Github Codespaces set up as well as .gitignore
files and virtual environments.
Make sure the Owner
name is NW-PaGe. Name your repository something descriptive and easy to type out. Avoid spaces and capital letters unless necessary.
The repo description can be filled out at any time after creating the repo
We don’t allow you to create a public repo initially. Please create a Private repo first, and then once you are ready to make it public you can.
Add a README file
box..gitignore
if the option is available (choose either R or Python)MIT
license unless you know you want a different license more info hereWhether you have created your own repo or want to contribute to someone else’s repo, you will need to make a local clone of that repo on your personal machine.
To make a local clone of a repo, click on the green Code
button when you’re in the main repo’s web page. In the local tab there are multiple ways to clone. For most of our work, I suggest creating an SSH key. If you are new to git/Github and on a Windows machine, I recommend installing the Github Desktop app and following the instructions below.
Cloning via HTTPS is a relatively quick process.
Code
button:Copy the path that starts with https://
, in this case it’s https://github.com/NW-PaGe/standards.git
In a terminal/command prompt, navigate to a folder of your choice (in windows I would make a folder called Projects here: C:/Users/<username>/Projects
)
https://github.com/NW-PaGe/standards.git
with your path:NOTE: the HTTPS method is good but it will require you to enter your username and a token every time you push a commit to the remote repo in Github. You will need to create a Personal Access Token (PAT) whenever you want to make a commit. If this is annoying to you, use the SSH or Github Desktop App methods.
Here’s a guide on making a PAT
Click on you Github profile icon in the upper right
Click Settings
Scroll down to Developer Settings
Select Personal access tokens (classic) and then Generate new token
When you make a commit you will need to input this personal access token when it asks for your password.
Do not store this token anywhere! Especially make sure it is not stored in your repo. This has tons of security risks and needs to be for singular use only
SSH is an excellent option for cloning a repo. It is similar to using an identifier to tell Github that you are, in fact, you. This video below is a great resource on how to set up the key. I will also write out the steps in the video below. Also, see the Github documentation for more information.
It should then ask if you want to make a passphrase. I recommend doing this
Get the pid
To save this file in nano, on your keyboard write CRTL+O
then ENTER
to save the file. Then CTRL+X
to exit back to the terminal. You can also open this file through a notepad or other software. You could also search for the file in your file explorer and edit it in notepad if that is easier.
In Github, go to your profile and the SSH + GPG Keys
section
Click SSH Keys, add a title, and in the key location write your key. You can find your key in your terminal by writing:
Copy the whole output including your email and paste it into the Github key location
Now you can clone a repo using the SSH key. Copy the SSH path and write this (replace the string after clone with your repo of choice):
The GitHub CLI is an excellent tool for not just cloning your repo, but for managing repositories and organizations from a terminal.
To install the CLI in Windos, I follwed the instructions provided in the Github CLI repo.
I normally install commands using Scoop, but you have many options here.
I created a personal access token.
You can also now do some cool things with your org/repo like searching for strings, creating issues, and more. For example, here are the issues in this repo:
To install in a linux terminal, I’m following the instructions provided in the Github CLI repo.
terminal
(type -p wget >/dev/null || (sudo apt update && sudo apt-get install wget -y)) \
&& sudo mkdir -p -m 755 /etc/apt/keyrings \
&& wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
&& sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& sudo apt update \
&& sudo apt install gh -y
I created a personal access token. In linux there are some issues with the command and using a browser fyi.
You can also now do some cool things with your org/repo like searching for strings, creating issues, and more. For example, here are the issues in this repo:
If you’re new to Git or Github and are using a Windows machine, the GitHub Desktop app is a great option for managing git workflows.
Install the app
You will need to authenticate your account
Now you should be able to clone repos through the app. In Github, when you click on the Code tab you will see the option to open in Github Desktop:
This will open up the desktop app and let you choose a file path for your Github repos. I recommend putting your repos into a Github or Projects folder in your local C drive, like this
C:/Users/yourname/Projects/<your-repo>/
If you’re cloning many repos you should put the repos into folders separated by the Github org
C:/Users/yourname/Projects/<gh-org-name>/<repo-in-org>/