Media Computation Skills Lab

MTEC 1003

Lab 4 / Part 2 - Creating and Setting Up Git Repositories

In this lab, you’ll be:

  1. creating two repositories, one local and one remote
  2. linking the two with each other so that they can be synchronized
  3. associate a name and email address with your local repository

Instructions

Set up Your Local Repository

This will create a local git repository to store your work for this lab. The repository will be in ~/Desktop/myClasses/mtec1003/lab-04-version-control.

cd ~/Desktop/myClasses
mkdir mtec1003
cd ~/Desktop/myClasses/mtec1003
cd mtec1003
mkdir lab-04-version-control
cd lab-04-version-control
ls -al
total 0
drwxr-xr-x  2 bree  staff   68 Feb 26 07:52 .
drwxr-xr-x  3 bree  staff  102 Feb 26 07:52 ..
git init
Initialized empty Git repository in /Users/yourUserName/Desktop/myClasses/mtec1003/lab-04-version-control/.git
ls -al
# in the directory of your repository
git config user.name  "my_user_name"
git config user.email "my@email.address"
git config -l

Create Your Remote Repository

This will create a remote git repository on github. It will also link your local repository with this remote repository. In order to submit your work, you will send your files / changes from your local repository to the remote repository on github.

git remote -v show
git remote add origin https://github.com/yourGitHubUserName/lab-04-version-control.git
git remote -v show
origin	https://github.com/yourGitHubUserName/lab-04-version-control.git (fetch)
origin	https://github.com/yourGitHubUserName/lab-04-version-control.git (push)

MTEC 1003 - Media Computation Skills Lab