Setting up your git repository off of the master - huit/cloud-boot-camp GitHub Wiki

Creating a Fork

  1. Navigate on GitHub to the repository you wish to Fork.

  2. Click on the "Fork" button (upper right)

This will for the Master to your local account to create your own repo copy

  1. Go to Terminal

  2. Make a directory that is the same of your github user name (mine is stephenmartino)

  3. Change to the new directory, i.e.: cd stephenmartino

  4. Type git clone HTTPS clone URL

My HTTPS clone URL was: https://github.com/stephenmartino/cloud-boot-camp-linux-ex1.git So I typed in git clone https://github.com/stephenmartino/cloud-boot-camp-linux-ex1.git Yours is located in your repository on the right about 3/4 of the way down the page.

  1. You will now see a directory called cloud-boot-camp-linux-ex1 in the directory that you created and changed to previously. (this exercise only, may be different in the future)

Syncing Your Recently Forked Repository

  1. git remote add upstream https://github.com/huit/cloud-boot-camp-linux-ex1.git

  2. git fetch upstream

  3. git merge upstream/master

** TEST YOUR CHANGES:**

Make your modifications to README.md

  1. git add README.md

  2. `git commit -m “I changed the READEME File"'

  3. git push

Create a Pull Request to submit your changes to the Master for approval

  1. Login to your account on GitHub

  2. Create a “Pull Request”

  3. This “Pull Request” of your changes will go to Rob for approval.

Updating git to reflect all changes from the Master

Each day you should run the below at the command line:

git fetch upstream

Create a new repository on the command line

touch README.md

git init

git add README.md

git commit -m "first commit"

git remote add origin https://github.com/huit/AWS-HA-Drupal.git

git push -u origin master

Push an existing repository from the command line

git remote add origin https://github.com/huit/AWS-HA-Drupal.git

git push -u origin master