CS 372 Spring 2016  >  Assignment 1


CS 372 Spring 2016
Assignment 1

Assignment 1 is due at 5 pm Thursday, January 28. It is worth 20 points.

Procedures

This assignment is to be done individually.

Do each of the exercises below. Turn in a PDF containing answers to the exercises on the UAF Blackboard Learn site, under Assignment 1 for this class.

Exercises (20 pts total)

  1. Creating and Using a Repository. Get Git set up on the system of your choice, including your identity (name, e-mail address). Play with it for a while until you are comfortable with it. Make at least one publicly available Git repository. This can be anywhere you like; GitHub is fine, for example. Work with this repository in a way that involves resolution of at least one merge conflict, and commit all your work to the public repository.

    Take a screenshot that shows the project history, displayed using either a GUI tool or the command line.

    What to include in the submitted PDF. Your answer to this exercise should include the following.

    • The repository URL, so that I can clone/pull from this repository.
    • The above screenshot image.
    • A description of the tools you used and steps you took to create the branches and the conflict, and how you resolved it. (This should be like a lab notebook, not formal, but something you could easily repeat the process from, if/when you need to.)

     
  2. Committing to a Group Project Repository. Make a commit, as described below, to the Git repository for the following project.

    https://projects.cs.uaf.edu/redmine/projects/cs372_2016_01_assn_01_ex_a

    In file printem.cpp (which should already exist in the repository), add one or more statements to function main that output your name and the grade you think you should receive on Assignment 1, followed by a blank line. Do not delete or modify any existing lines of code. The idea is that the final version of printem.cpp will print the name and grade deserved for every student in the class. Your commit must be made by an identity with your name, so you will need to configure Git correctly on your local machine.

    If you accidentally do the commit incorrectly, then undo the changes you made, commit the result, and start over.

    What to include in the submitted PDF. Nothing is required. To do this exercise, you only need to make the commit to the repository.
     

  3. Other Git Commands. Look up documentation for three Git commands that were not covered in class. For each command, name it and explain what it does in an understandable way.

    The Git commands discussed in class (which are therefore not eligible for inclusion in your answer to this exercise) are the following: add, branch, checkout, clone, commit, log, merge, pull, push, status. We also looked briefly at help, reset, and rm.

    What to include in the submitted PDF. Your answer to this exercise should include the names of the three commands and an understandable explanation of what each does.

    A bad example:

    Command: rebase.
    Action: Forward-ports local commits to the updated upstream head.

    The above explanation is completely correct, and also pretty much incomprehensible to anyone who is not thoroughly familiar with Git. Please write your explanation so that it can be understood by someone who is not an expert.