Media Computation Skills Lab

MTEC 1003 - Fall 2016

CLONING REMOTE REPO with HTTPS (SP2016)

Create Your Remote Repository

This will create a remote git repository on github.

  1. Go to your account home (github.com/username).
  2. Click on the Repositories tab.
  3. Click the green New button on the right side.
  4. Give your repository the name [lab-07-clone-https].
  5. The repository should be public (the default).
  6. Click "Initialize this repository with a README".
  7. Click Create Repository.
  8. Refresh your main GitHub page and you should see the new repository.

Cloning your repository

This will clone the repository you just created on GitHub on your local machine.

cd ~
mkdir myname
ls -al
git clone https://github.com/your_username/lab-07-clone-https.git
Cloning into 'lab-07-clone-https'...
remote: Counting ojects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (3/3), done.
Checking connectivity... done.
cd lab-07-clone-https
git remote -v
https://github.com/your_username/lab-07-clone-https.git
origin https://github.com/your_username/lab-07-clone-https.git (fetch)
origin https://github.com/your_username/lab-07-clone-https.git (push)
# in the directory of your repository
git config user.name  "my first and last name"
git config user.email "my@email.address"
git config -l

Creating and Saving Changes Locally, Sending to Remote Repository

In this part of the lab, you will edit a text file in your local repository, and then you’ll send it to your remote repository.

git status
On branch master
Your branch is up-to-date with 'origin/master'.

nothing to commit, working directory clean
git status
On branch master
Your branch is up-to-date with 'origin/master'.

Changes not staged for commit:
  (use "git add ..." to update what will be committed)
  (use "git checkout -- ..." to discard changes in the working directory)

      modified:    README.md
no changes added to commit (use "git add" and/or "git commit -a")
git add --all
git status
On branch master
Your branch is up-to-date with 'origin/master'.

Changes to be committed:
  (use "git reset HEAD ..." to unstage)

      modified:    README.md
git commit -m "edited the README file"
[master 5b24d27] edited the readme file
 ...etc
git status
# On branch master
nothing to commit, working directory clean
git log --color
commit 5b24d2777a602908978916ca8fe9c8dd2ed6036b
Author: bree <bzuckerman@citytech.cuny.edu>
Date:   Wed Mar 5 11:45:21 2015 -0500

    edited the README file
git push origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 242 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://github.com/bzuckerman/lab-07-generating-ssh-keys.git
 * [new branch]      master -> master

MTEC 1003 - Media Computation Skills Lab - Spring 2015