Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
README.md 7.21 KiB

Welcome to cmsc436 Fall 2020 semester

What is Git and how to install it

Git is the industry standard for souce code management in industry. The course is not about git and all that it can do but rather we are using it as a tool to distribute code to you as well as how you will be submitting your project/laboratory implementations.

Git is an extremely powerful tool and while we will only be using a very small set of its features if you would like to learn more start here. To get started using git you will need to install in on your system. Here is a link to how to install git on a Mac, Windows or Linux system.

NOTE: There are countless git clients that provide a graphical user interface for you to use. In fact Android Studio provides a built in git client itself. We, however, will be focusing on using git from the command line.

Our git workflow

You will need to clone this repository on your local development machine. In addition to that you will also need to add an additional remote repository that we will refer to as upstream. When cloning your repository and adding additional remotes, you must decide on whether you want to use ssh or https protocals. The primary difference is that if you use https you will need to enter your diretory ID and password everytime you push to your origin remote. If you have already added a ssh key to your university gitlab account you can still use it. If you do not have a ssh key and would like to add one follow the steps in this document. The suggested type of key to generate is a 1024-bit RSA key.

The following set-up steps assume https as the chosen protocal for cloning your git repo and adding upstream.

  1. clone your repo locally wherever you plan on doing your development work for the course.
    Navigate to the directory where you want to clone your repository and run the following command: git clone https://gitlab.cs.umd.edu/cmsc436fall2020/cmsc436-<your-directory-id>.git. When this command is complete you will now see a new directory that will have the name cmsc436-<your-directory-id>.
  2. Navigate into your new cloned repository. From the command line you would enter: cd cmsc436-<your-directory-id>.
  3. Run git remote -v. You should see an output like the following:
origin	https://gitlab.cs.umd.edu/cmsc436fall2020/cmsc436-<your-directory-id>.git (fetch)
origin	https://gitlab.cs.umd.edu/cmsc436fall2020/cmsc436-<your-directory-id>.git (push)