Difference between revisions of "OPS435 Online Lab1"

From CDOT Wiki
Jump to: navigation, search
(Task 1: Create a Github.com account)
Line 60: Line 60:
 
</pre>
 
</pre>
  
=LAB 0 SIGN-OFF (SHOW INSTRUCTOR)=
+
=LAB 1 SIGN-OFF Upload the following files individually to Blackboard=
:Have the following items ready to show your instructor:
+
:* gitlog.txt: contains the output of the command "git log" from Task 3
:* You lab 0 note on your lab log book showing your github.com user name
+
:* repo_tree.txt: contains the output of the command "tree -a" from Task 3
:* The output of the command "git log" from Task 3
+
:* lab1_check.txt: contains the output of the command "python3 ./checkLab1.py -f -v"
:* The output of the command "tree -a" from Task 3
 
  
:You also need to
 
:* Put the above information in a plain text file named "lab0_[your_seneca_user_name].txt" and submit it via Blackboard by the lab 0 due date.
 
 
= Lab Review =
 
= Lab Review =
 
:# What is a git repository?
 
:# What is a git repository?

Revision as of 19:23, 10 May 2020

Introduction to git, github.com, and Python

Lab Objectives

In this lab, you will create an account on github.com and follow the Github "Hello World guide" to create a new public repository on github to learn about the basic workflow of using github to track and manage revisions of software or other contents. The essential operations provided by Github includes
  • creating new repository,
  • creating a new branch,
  • making changes to files,
  • creating a pull request, and
  • opening and merging a pull request.
You will then use the git client on matrix.senecacollege.ca to access and download the contents from the repository you created on github. Note: if you have your own Linux VM ready, you can also install and use the git client on your VM.
You will also use the git client on matrix.senecacollege.ca to clone the repository on github.com which hosts the Python scripts for lab 1.
Study and execute Python scripts downloaded from the lab 1 repository

Reference

Overview

  • git - a distributed revision control system with rich command set that provides both high-level operations and full access to git's internals.
  • Github - a code hosting platform for version control and collaboration that lets people work together on software projects from anywhere.

Tasks

Task 1: Create a Github.com account

  • Start your web browser and go to github.com and use your Seneca email to sign up for a new account if you don't already have one.
  • Record your github.com user name on your lab logbook.
  • email your github.com user name to your OPS435 professor from your Seneca email account.

Task 2: Create a project and make a pull request on GitHub

Follow the Github "Hello World Guid" here to perform the following activities:
  • Create a repository
  • Create a branch
  • Make and commit changes
  • Open a pull request, and
  • Merge your pull request
Please make the following changes when following the guide:
  • name the new repository using your Seneca user name instead of "hello-world".
  • add your full name, and OPS435 section to the README file, do not post any other personal information there.

Task 3: Clone a Github.com repository into a new directory on a Linux system

You can do the following steps either on matrix.senecacollege.ca or on your CentOS 7 vm:
  • login to matrix.senecacollege.ca or your CentOS 7 vm
  • create a directory named ops435/lab0 under your home directory
  • change your working directory to ~/ops435/lab0
  • run the following git command to clone the repository you created in Task 2 on github.com
   git clone https://github.com/[your_github_user_name]/[your_seneca_user_name]
for example, if your github user name is "rc2030", and your seneca user name is rchan, the git command to clone the repository you created in Task 2 should be:
   git clone https://github.com/rc2030/rchan
  • change your working directory to your cloned git repository, which should be ~/ops435/lab0/[your_seneca_user_name]
  • run the following two commands and capture their output to a file or to your lab log book:
   git log
   tree -a

LAB 1 SIGN-OFF Upload the following files individually to Blackboard

  • gitlog.txt: contains the output of the command "git log" from Task 3
  • repo_tree.txt: contains the output of the command "tree -a" from Task 3
  • lab1_check.txt: contains the output of the command "python3 ./checkLab1.py -f -v"

Lab Review

  1. What is a git repository?
  2. What kinds of data can be stored in a git repository?
  3. What is a git branch?
  4. What is the name of the definitive branch in a git repository?
  5. What is a "pull request" related to a branch in a git repository?