Working with GitHub
Jump to navigation
Jump to search
GitHub is a way to keep track of your code for a project, while also allowing a team to work independently on the same project. It is a bit unintuitive to use; it combines using a web browser with command line functions (through the Mac terminal, or Windows Command Line).
Installing Git (one time only)
Macs:
Install Xcode, which will include Git automatically
xcode-select --install
Windows: https://git-scm.com/download/win
To check to see if the installation was successful, run:
git --version
Getting onto GitHub (one time only)
- Create an account on GitHub https://github.com/
- Create a SSH key for GitHub: (Do this on each computer that you own (not in a computer lab) will be using regularly)
- Notice that there is a tab to change the instructions to Windows or Linux.
- I recommend setting up a passphrase (a password) to secure your computer even more.
- Follow the "Generation a new SSH key" and the "Adding your SSH key to the ssh-agent" sections.
- Then, follow the "Adding a new SSH key to your GitHub account"
- Key type: Authentication Key
Cloning the repository (the first time you are working with a new project, i.e. a new code repository)
- If needed, ask Eric for access to the proper repository.
- Log onto GitHub and navigate to the repository that you are working on. For example:
- Clone the repository
- Click on the green "<> Code" button
- Select SSH
- Copy the resulting link
- On your terminal:
git clone <clone link>