Skills Building: Git

In Practice

Git is often used from the command line, but it can be intimadating.

So a lot of graphical programs have been created to make it more approachable- including the GitHub website itself.

Let’s take a look at the sensor.community source code for their ESP8266 based sensors: https://github.com/opendata-stuttgart/sensors-software

Tasks

  • click on the readme.md and look at the raw content.
    • what format is it?
    • Is GitHub automatically formatting it?
  • Look at the history for readme.md.
    • Does it make sense? Are the commit messages useful?
  • go back to the top of the project
  • Find the branches menu and explore these
    • what do you think these branches are?

GitHub adds even more functionality such as bug reporting, code reviews, and much more; you can even make basic edits to files, and it’s possible to have it automatically run tests and build the software (Continuous Integration.)

Now let’s find our source code on GitHub:

Using Git On your Computer

GitHub has their own simplified graphical program called GitHub Desktop.

We’re going to use this to download copies of our shared source code from GitHub.

Tasks

  • install and start GitHub desktopalready installed on MakeItZone computers
  • Login with your GitHub account
    • If it doesn’t ask for your account, go to the file menu -> options and sign-in on via the account area.
  • clone both of our git hub repos, listed above (CommunitySensorsHardware and CommunitySensorsDataScience)
  • explore what GitHub desktop can display; is it similar to the GitHub website?
  • find the files that it downloaded
  • make sure you are added as a GitHub contributor to our repos!

IMPORTANT FOR SHARED COMPUTERS: make sure you SIGN OUT of your GitHub account from GitHub desktop (file->options) before you leave!

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top