Skip to content

Latest commit

 

History

History
68 lines (34 loc) · 2.78 KB

CLONING_CODE.md

File metadata and controls

68 lines (34 loc) · 2.78 KB

Bringing Code to Your Machine

Go back to Readme Home

Set up your environment

Make sure you have created a place to put all of the code from Github, for example:

$ mkdir /Users/<YOUR NAME HERE>/MyProjects/

Setting up your repository for work

  1. Install and configure git on your local machine if it is not already installed. See instructions here.

  2. 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)

  3. 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

  4. 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

Windows machines only

  1. 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).

  1. Create SSH key by entering this into your terminal window:

    ssh-keygen -t rsa -C "youremail@somedomain.com"

  2. Add SSH private keys into the SSH authentication agent, by entering this into your terminal window:

    ssh-add ~/.ssh/id_rsa

  3. Copy the contents of the public key file into your computer's clipboard:

    pbcopy < ~/.ssh/id_rsa.pub

  4. 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".

  5. Click the "New SSH key" button on the top right.

  6. 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".


Next: Running WebApp for the First Time

Go back to Readme Home