Homework 1

Due 23.59, Aug/30/2020

Doing a small project using version control

  1. Find a lab-partner.

1. Read the sections on UNIX, Bitbucket, and Git. This means that you have:

  • installed Git on your computer;
  • created a private Bitbucket repository, say 471YOURLASTNAME;
  • cloned the remote repository to your local machine;
  • created a file named test.txt to your new local directory;
  • added, commited (with the message “My 1st commit of test.txt.”), and pushed the new file to your Bitbucket repository;
  1. Now modify your test.txt file by adding two more lines to the test.txt file:

    I am YOUR_NAME. (or We are YOUR_NAMES)
    I am learning version control.
    
  2. Then add and commit (with a message, e.g. “added two more lines to test.txt.”) the modifed file, and push it to your Bitbucket repository.

  3. Add a sub-directory for the first homework (say HW1) to your repository and move the test.txt file to this sub-directory. Add, commit, and push.

  4. Next, create two README.md files, one in the top-level directory (i.e. 471YOURLASTNAME), and one in the sub-directory HW1. The extension .md indicates that this file is a text file created using a Markdown language. A README file contains information about other files in a directory. For example, it may contain instructions where to find your homework report and code, and how to execute your codes, etc. The idea is to generate a top-level README file in the master repository (giving general information about your repository and its sub-directories) and one low-level README file for each homework assignment (describing for instance how to compile and run the programs for a particular homework). For example, a typical low-level README file could contain something like:

    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    README file for Homework 2, Math 471, Fall 2017, M. Motamed
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    
    - The homework report is in the directory
      HW2/Report and is called homework2.pdf.
    - The code for this homework is located in
      HW2/Code and is documented in the appendix
      of the report.
    - To reproduce the results in the report do this:
           1. bla bla bla
           2. bla bla bla
           3. ...
           (where this is a description of how to recreate the results).
    

    Note that in Homework 1, there will be no pdf-report and code. But we will have reports and codes in next homework assignments (e.g. in Homework 2). Once you are done editing your readme files you will first add them to your local Git repository, commit locally and then push your changes to your remote repository on Bitbucket:

    $ git add README.md
    $ git commit -m "Added a README"
    $ git push
    
  5. To submit your homework for grading first add me as members to your repository by Settings -> User and group access -> Users. My user name is “motamed”, and my email address connected to this user name is “motamed@math.unm.edu”. I will need “write” privileges so that I can add comments. Then, when you are ready to submit (before the due time / date), send me an email with the SHA-1 checksum from the appropriate commit (use git log to get the hexadecimal checksum number). This checksum will identify the version of your repository that you want me to grade. Note that upon grading I will first read the readme files where you will put instructions where I can find the report and code for each homework (a subdirectory, named HW1, containing a test.txt file for this particular homework).