Setting up your git repository off of the master - huit/cloud-boot-camp GitHub Wiki
Creating a Fork
-
Navigate on GitHub to the repository you wish to Fork.
-
Click on the "Fork" button (upper right)
This will for the Master to your local account to create your own repo copy
-
Go to Terminal
-
Make a directory that is the same of your github user name (mine is stephenmartino)
-
Change to the new directory, i.e.: cd stephenmartino
-
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.
- 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
-
git remote add upstream https://github.com/huit/cloud-boot-camp-linux-ex1.git
-
git fetch upstream
-
git merge upstream/master
** TEST YOUR CHANGES:**
Make your modifications to README.md
-
git add README.md
-
`git commit -m “I changed the READEME File"'
-
git push
Create a Pull Request to submit your changes to the Master for approval
-
Login to your account on GitHub
-
Create a “Pull Request”
-
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