Intro to Git and Github

Part 1: Intro to Git and Github

Learning objectives

  • Use Git to manage projects.
  • Use Git to publish a website using Github.
  • Manage content with simple markdown text files.
  • Appreciate how simple text files and git ease collaboration and rapid development.
  • Automatically generate websites, documents and presentations from simple text files.
  • The pros and cons of using Git as a tool to manage, organize, and collaborate on the deployment of courses.

Introductions

Please introduce yourself to the person sitting next to you, sharing your position and area of study or research.

Then we will go around the room and each person will introduce the person they just met.

What are Git and Github

  • Git is a software tool for collaborative software development. It has a command line interface and can also be used with cloud platforms like Github (see below). It tracks all changes made to files and can merge changes made separately by different people.

  • Github is a web platform owned by Microsoft that hosts Git projects and provides complementary tools.

Sign up for Github

Please make an account at https://github.com/.

Using Git and Github

  • If you have Git already installed on your computer, please feel free to use it if you feel comfortable.

  • If you do not have Git installed, everything can be done on the cloud using Github.

Git definitions

  • repository : a directory of files tracked by Git
  • fork : a copy of someone else’s repository in your Github account

Git steps and terms

  • git add <filename> : add your file to a list of files to be committed
  • git commit : update the repository with your changes
  • git push : transfer your local changes to a remote repository like Github (backup)
  • git pull : transfer any remote changes on Github to your computer.

Github features

https://github.com/massma/ltf-github-website-courses

How can Github’s features be useful (or painful) for deploying and organizing course materials?

  • Take a moment to write a few thoughts down on your own, in your text editor or on scrap paper (1 min)
  • Share your thoughts with the person next to you (3 min)
  • Group discussion (3-5 min)

Let’s collaborate on this workshop

  1. Fork the repository.
  2. Enable Github pages
  3. On your version of the repository, edit workshop files (*.md) to improve the workshop on Github.
  4. Or, if you installed Git you can clone your version of the repository to your local computer and edit with your text editor of choice. Recommended if you plan on using these tools a lot.

Ideas for contributions

  • Add your name and uni to the attendees section of the website landing (index.md)
  • Improve any errors or confusing spots in the slides
  • Open an issue if something was confusing but you do not know how to fix it.
  • Add content to the main website, or to some initial websites hosting resources for EEAE students and Water Center people.

Let’s merge our changes

  • Submit a pull request to my original repository, which will request to add your changes.
  • I will then re-generate content with pandoc (next presentation)
// reveal.js plugins