Goals

Learning about version control systems and how they help in the development of DH project, 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 from https://git-scm.com/download/win. Please, chose 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).
    • 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.

In Class

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

General git workflow:

  • In Terminal (on Mac) or Git-Bash (on Windows)
    • fork a repository
    • clone
    • work
    • add
    • commit
    • push / pull
    • send pull request

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 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

  • Build your website on .
    • You can use this template https://github.com/daattali/beautiful-jekyll (the page also includes step-by-step instructions; our course website is built with this theme).
    • 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 Codecademy’s Learn Git https://www.codecademy.com/learn/learn-git;
  • Publish your confirmation screenshot as a post on your new site;
  • Complete the markdown tutorial @ https://www.markdowntutorial.com/. This will help you to write pages on your website