ETC5513: Collaborative and Reproducible Practices

Assignment 2

Author

Michael Lydeamore

Published

3 April 2025

🎯 Objectives

  • Work on a reproducible workbook
  • Practice markdown syntax
  • Demonstrate that you have a strong knowledge of git commands and usage
Important

This is an individual assignment.

The guide

Create a written guide which demonstrates your knowledge on git, GitHub, and the command line interface.

The guide should demonstrate your ability to use these tools efficiently for version control and collaboration. Make sure you explain what you are doing in each step and why.

Please make sure you include all of the steps described below.

You only need to use commands we have learned in class.

  1. Create a new RStudio Project. In this folder, create a simple qmd file called example.qmd that can be knitted into a HTML file. Show this by knitting the file.

  2. From the command line interface, initialise this folder as a git repository and push it to the GitHub classroom repository.

  3. Create a new branch called testbranch. Modify the file example.qmd and add the changes to both the local and remote repositories. Add another commit in this branch where you create a folder called data, and add the data from Assignment 1 to that folder.

  4. Amend the previous commit to include the data folder. Push this amended commit to the remote.

  5. Switch back to the main branch and modify example.qmd in a different way such that it will conflict with testbranch. Commit and push these changes.

  6. Merge the changes in testbranch onto main. Show the conflict and fixing the merge conflict. Push the changes to GitHub, showing the status and changes in GitHub.

  7. Tag this commit v1.0 on main using an annotated tag.

  8. Delete branch testbranch locally and on the remote.

  9. Show the commit log in condensed form in the terminal.

  10. On main, create a new section in example.qmd that includes an easy to make plot. Commit the changes, and demonstrate using the command line interface how to undo the commit without losing your local changes.

Tip

To reset your GitHub repository on GitHub classroom, use the following steps from inside the working directory:

rm -rf .git
git init
git commit -m "Initial commit" --allow-empty
git remote add origin <git-url>
git push -u --force origin main

Note that this will completely overwrite your remote git repository, and will delete whatever was previously in it

Marking Rubric

  • Each of the instructions will be assessed as to whether they are successfully completed or not (1 mark each, total 10 points)
  • Clear commit messages used in the video (1 point)
  • Presentation has good flow and is clear (2 points)
  • Issues with language and grammar: Maximum deduction of 3 points