Profile Image

Tools & Techniques for Digital Humanities (2019W)


070112 UE Course in Methodology - Tools & Techniques for Digital Humanities (2019W) — University of Vienna, Department of History; Instructor Dr. Maxim G. Romanov


L03 Version Control and Collaboration — Getting to know git and github.com

Goals

Learning about version control systems and how they help in the development of DH projects, which are often a lengthy and complex, and require organic collaboration.

Software & Other Required Materials

  • Make sure to create a github account (https://github.com/), if you do not have one.
  • Download and install git software:
    • for Windows:
      • you can download it from https://git-scm.com/download/win. Please, choose 64-bit Git for Windows Setup.
        • you can also install a portable version of git which does not require installation https://git-scm.com/download/win. For this, choose 64-bit Git for Windows Portable. Simply download and unzip (Suggestion: move that unzipped folder to the folder where you keep all class-related files and materials). In the folder, run git-bash.exe (for a more Unix-like command line) or git-cmd.exe (for Windows command line).
    • for Mac: try to run git --version from Terminal. If git is not installed, you will be prompted to install Xcode Command Line Tools which comes with git among other things. This is the easiest way.
    • Note: there are also interface tools for github. We will not be working with them in the class, but you are welcome to test them on your own at home. See, https://desktop.github.com. The main reason for this is because interface tools will be different for different operating systems, while the command line usage will be exactly the same across all platforms.

In Class

  • Basic git functionality;
  • Starting a github-based website;
  • Basics of markdown;

General git workflow:

Note: Steps 1 and 7 are relevant only when you work on a project (repository) that is owned by somebody else. If you work on a repository that you created under your account, you only need steps 2-6.

Main git Commands

  • git clone <link>
    • clones/downloads a repository on you machine
  • git status
    • shows the current status of the repository (new, changed, deleted)
  • git add .
    • adds all new files and modified files to the repository
  • git commit -m "message"
    • saves all files in their current state into the repository, and created a milestone
  • git push origin master
    • uploads changes to https://github.com
    • NB: sometimes you may get an error, which in most cases means that you need to pull first
  • git pull origin master
  • git log
    • shows the history of commits; here you can choose where you want to roll back, in case of troubles

Some useful command line commands

  • pwd
    • shows you where you are on a drive (gives you path)
  • ls / dir [on Windows]
    • shows everything in the your current location/folder
  • cd <name of the folder>
    • takes you to that folder
  • cd ..
    • takes you one level up in the tree structure of your computer

Reference Materials

Homework

  • Make sure to work through the readings given in the Reference materials above. They include all you need to know to complete the homework assignment.
  • Your main assignment is to build your website on https://github.com.
    • You can use this template https://github.com/daattali/beautiful-jekyll (the page also includes step-by-step instructions.
    • Brief instructions (more details can be found in Visconti’s tutorial (see above), and on the page of the suggested template)
      • fork
      • create a repository under your account with the name: username.github.io, where username is your github username; the repository with such names are automatically treated by github as a website.
      • copy all files from the forked repository into your new one (clone > copy/paste).
      • README.md has all the instructions on how to make modifications to your site; play with those!
      • you can pick a different theme for you site (just google jekyll themes for options).
  • Complete the markdown tutorial @ https://www.markdowntutorial.com/. This will help you to write pages on your website.

Submitting homework:

  • Homework assignment must be submitted by the beginning of the next class;
  • Email your homework to the instructor.
    • if your homework is to create a file, email it as an attachment
    • if your homework is a blogpost on your website, email the link to your website and to the blogpost with your homework.
    • In the subject of your email, please, add the following: 070112-LXX-HW-YourLastName-YourMatriculationNumber, where LXX is the lesson for which the homework is submitted, YourLastName is your last name, and YourMatriculationNumber is your matriculation number.