Published January 20, 2025 | Version 1.2.0
Presentation Open

Getting Started with Git and GitHub at UU Geosciences

  • 1. Utrecht University

Description

Presentation for the workshop Getting Started with Git and GitHub. 

This presentation introduces basic Git and GitHub concepts, after this presentation hands on working with GitHub desktop occurs. 

New in Version 1.1.0, the manual for the workshop has been added. The manual is an 80 page PDF going through all the steps taken in the workshop with screenshots. 

New in Version 1.2.0, minor updates to content. GitLab slide is simplified and Gitea added. 

As a precursor to the workshop, attendees are asked to create a GitHub.com account, install GitHub Desktop, and install a recomended code editor such as VS Code, VS Codium, Sublime, or R Studio. 

The workflow of the hands-on section is as follows:

  1. Create a repository in GitHub
    1. Choose an owner
    2. Name the repository
    3. Write a short description
    4. Initialize with a README file
    5. Choose a license
    6. Choose a .gitignore template
  2. Clone the repository locally with GitHub Desktop
    1. Change the local repository path because local computer management and syncronynization with network drive can cause issues. 
    2. Explore the GitHub Desktop interface
    3. Open repository from GitHub Desktop into a code editor
    4. Make a change to the README.md file
    5. Commit change to local repository
    6. Push to remote repository
  3. View change in GitHub.com
    1. Check for update by reloading repository page
    2. Press the "." key to open hosted VS Code editor in webpage
    3. Make another change to README.md
    4. Commit change to README.md in hosted VS Code
    5. Go back to view change in GitHub.com
  4. Fetch origin in GitHub Desktop
    1. See that GitHub Desktop does not show the change made remotely
    2. Push fetch origin to tell GitHub Desktop to look for remote updates
    3. Pull from origin
    4. Check updates locally in file explorer and code editor
  5. Create code file in local repository
    1. Create or copy code file to local repository
    2. Create a functioning code function
    3. Commit change when code function is functional
    4. Write commit message and long description
  6. Create config file
    1. Create config file with secrets like SSH private keys, passwords, AWS keys, etc
    2. See change in GitHub desktop
    3. Right click to ignore config file
    4. Check to see change from new config file as Git addition to .gitignore file update. 
    5. Create config.template file to demonstrate proper config file availability for other users
    6. Commit changes with the .gitignore update and new config.template file
  7. Q&A (FAQ below)
    1. How do I add collaborators?
    2. How do I join UU organizational account?
    3. How do I see Git history?
    4. How do I handle multiple file updates but unrelated functionality?
    5. When do I commit? 
      1. Use example of working while commuting to the office (safety commit)

Files

Git_GitHub_General_Late2024Update.pdf

Files (17.4 MB)

Name Size Download all
md5:53c9cf2669cccdf810cc16f37fc60058
1.5 MB Preview Download
md5:8ef41e3aae123c59b7f78171546f326c
7.9 MB Download
md5:c7b24f09bb8f9d56225a01085602c1ab
8.0 MB Preview Download