Make sure you have created a place to put all of the code from Github, for example:
$ mkdir /Users/<YOUR NAME HERE>/MyProjects/
-
Install and configure git on your local machine if it is not already installed. See instructions here.
-
Create a fork of wevote/WebApp.git repository. You can do this from https://github.com/wevote/WebApp with the "Fork" button (upper right of screen)
-
Using your terminal program, change directory into the local folder on your computer where you want the WebApp repository to be downloaded (replacing "" with your login name, and with your github username) and clone your fork:
cd /Users/<YOUR NAME HERE>/MyProjects/
git clone https://github.com/<YOUR GITHUB USERNAME HERE>/WebApp.git
-
Change into your local WebApp repository folder, and set up a remote for upstream:
cd /Users/<YOUR NAME HERE>/MyProjects/WebApp
$ git remote add upstream git@github.com:wevote/WebApp.git
-
Set the line endings to LF in git so ESLint doesn't flag CRLF line endings as errors
$ git config --global core.autocrlf false
Next, set * text=auto
in your .gitattributes
file (you may need to create this file in your root WebApp folder)
* text=auto
Finally, set the core.eol to LF
$ git config --global core.eol lf
Create and set up SSH keys. (For Windows machines, refer to these instructions instead).
-
Create SSH key by entering this into your terminal window:
ssh-keygen -t rsa -C "youremail@somedomain.com"
-
Add SSH private keys into the SSH authentication agent, by entering this into your terminal window:
ssh-add ~/.ssh/id_rsa
-
Copy the contents of the public key file into your computer's clipboard:
pbcopy < ~/.ssh/id_rsa.pub
-
Go to your Github account's "Settings" page (click on your avatar on the top right to see "Settings" in the drop-down menu). In the left navigation of the "Settings" page, choose "SSH and GPG keys".
-
Click the "New SSH key" button on the top right.
-
Paste the contents of the "~/.ssh/id_rsa.pub" key file (which you just copied in step 3) into the "Key" text area, and give it any Title you would like. In the Title field, enter text to remind you the purpose of this key (ex/ My Macintosh). Set the drop-down option to "Authentication Key".