SherinSam / ca-study-group

A shared collection of notes, solutions, resources and other bits and bobs from Coder Academy's Melbourne cohort

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Coder Academy Cohort Resources

Welcome to the repository for shared notes, challenge solutions, resources and other bits and bobs from Coder Academy's Melbourne bootcamp cohort.

Coding is hard, pushing to GitHub even scarier. The repo is a space to practice and share your stuff with fellow students.

Study-Group

Any and all contributions are welcome - consider this our very first open source project!

Contributors

Please DM me if you'd like to be added to the repo as a contributor.

You'll receive an invite from GitHub which you'll need to accept first to have the correct permissions.

All contributors will have full read/write access so you can push updates straight away.

Important

As all contributors automatically have read/write access, please check that you have the latest version of the repository cloned locally to your laptop before pushing changes so existing updates aren't overridden! 🤗

Contents

Initial Setup

Before you set up your fork and remote, decide where you want this to be saved on your local computer.

Create this folder somewhere meaningful so that once you have setup the remote, you can push updates automatically using the Updating Your Forked Repository and Pushing Updates to GitHub instructions.

Note: When you clone a repository to your computer, GitHub will create a folder for the repo and copy the cloned files into this folder. Avoid renaming or moving this folder otherwise you will need to set up the remote again.

Forking

While logged into your GitHub account, navigate to the ca-study-group repository and hit the Fork button in the top-right hand corner:

https://github.com/linda-lai/ca-study-group

Fork

That's it! There's now a forked version saved to your GitHub.

Cloning

While forked version is saved in your GitHub account online, you won't have the files in the repository on your computer.

To create a clone of your fork locally on your computer:

  1. Navigate to the forked ca-study-group repository saved to your GitHub.

  2. Under the repository name, click Clone or download.

  3. In the Clone with SSH section, click the clipboard to copy the clone URL for the repository:

Cloning

  1. Open Terminal.

  2. Type git clone, and then paste the URL you copied:

    $ git clone git@github.com:YOUR_USERNAME/ca-study-group.git
    
  3. Press Enter. A local clone will now be created on your computer.

Configuring Git to Sync to Fork

To setup the connection to allow GitHub to pull updates from the original upstream repo (https://github.com/linda-lai/ca-study-group), to your forked version, i.e. origin:

  1. Navigate to original ca-study-group repository on GitHub.

  2. Under the repository name, click Clone or download.

  3. In the Clone with SSH section, click the clipboard to copy the clone URL for the repository.

Cloning

  1. Open Terminal and change directories into the folder where you have cloned the local files to.

  2. Type git remote -v and press Enter to see the current configured remote repository:

    origin  git@github.com:YOUR_USERNAME/ca-study-group.git (fetch)
    origin  git@github.com:YOUR_USERNAME/ca-study-group.git (push)
    
  3. Type in git remote add upstream and paste in the URL copied from the original (not forked) repository and hit enter. It should look like:

    $ git remote add upstream git@github.com:linda-lai/ca-study-group.git
    
  4. To confirm the new upstream repository has been correctly set up for your fork, type git remote -v again. It should show the URL for your fork as the origin and the original repository as the upstream.

    origin    git@github.com:YOUR_USERNAME/ca-study-group.git (fetch)
    origin    git@github.com:YOUR_USERNAME/ca-study-group.git (push)
    upstream  git@github.com:linda-lai/ca-study-group.git (fetch)
    upstream  git@github.com:linda-lai/ca-study-group.git (push)
    

Updating Your Forked Repository

To download the latest files from the original repo:

  1. Check your forked repository to confirm if there have been additional updates made. If there have been updates, GitHub will show the below message: "This branch is [X] commits behind linda-lai:master."

Note: Make sure you are on your master branch before pulling from the upstream (original) repository.

  1. To check your current branch:

    $ git branch
    
  2. Checkout so that you are on your master branch (if you aren't already):

    $ git checkout master
    
  3. While on your master branch, to download the latest files to your local computer, enter:

    $ git pull upstream master
    

This will download the latest version of the files to your computer.

  1. To push the latest files from the original GitHub repo to your forked repo, enter:

    $ git push origin master
    

Pushing Your Updates to GitHub

Once you've updated your forked repo and downloaded the latest files to your local computer:

  1. Create a new branch or checkout to an existing branch to work from.

    To create a new branch:

    $ git checkout -b [BRANCH-NAME]
    

    To go back to an existing branch to work off:

    $ git checkout [BRANCH-NAME]
    
  2. Make your updates to the existing file and/or save the files you'd like to push to original repo into the relevant folder.

Pushing Updates to GitHub

  1. When you are ready to commit and push the updates, open up Terminal and check the changes and branch to be committed:

    To check your current branch:

    $ git branch
    

    To check which files have been changed:

    $ git status
    
  2. Add the file(s) to be pushed through as an update:

    $ git add [FILENAME-1] [FILENAME-2]
    
  3. Commit the changes:

    $ git commit -m "[COMMENTS RELATED TO UPDATE]"
    
  4. Push the update to the main repo:

    $ git push origin [BRANCH-NAME]
    
  5. Voila! The changes will be pushed to the main repo.

To download the updated repo files to your local computer and push to your GitHub account, follow the steps outlined in the Updating Your Forked Repository section.

Folder and Filing Conventions

To keep things manageable and findable (and to be nice to your fellow contributors), please label for file or leave comments with your name so we know who's contributed the file without having to dig through the logs.

For example:

js-fundamentals-q1-linda.js

That way, if you find a solution or notes that you'd like to rubberduck with the owner, you can easily find out who.

Any questions, shout out!

About

A shared collection of notes, solutions, resources and other bits and bobs from Coder Academy's Melbourne cohort


Languages

Language:Ruby 82.8%Language:JavaScript 17.2%