Introduction to GitHub Repositories and GitHub Desktop
In this workshop, attendees will learn about one of the most useful and widely adopted platforms on the internet, GitHub. GitHub is a very versatile tool, and this workshop covers its most basic function, as a free storage location for your data! In addition, this workshop covers how to use GitHub Desktop and the basic project workflow. This workshop is the first in the GitHub Workshop Series offered by the Brock University Digital Scholarship Lab.
No prior experience is needed to attend this workshop.
Estimated workshop length: 1.5 hours
Setup
In preparation for this workshop, you will need the following:
- A GitHub account which you can get by clicking the “Sign Up” button at the top right of https://github.com/.
- GitHub Desktop which can be acquired at https://desktop.github.com/. Keep in mind that if you are not using a personal computer for this workshop, you may need to contact your IT department for permission to install new software.
- A file to upload to your new repository. This can be anything from a blank text file to a picture. Just keep in mind that it will be on a public repository so don’t use anything inappropriate or sensitive.
Workshop Tasks
Task Set 1
- Navigate to GitHub.com and either sign in or sign up using the buttons at the top right of the screen
- From your dashboard, click either the “New” or “Create repository” button in the top left
- Fill in the new repository form with a name and description then make sure your repository is set to public and check the README box. After all that click “Create Repository”
- Once you have your repository made type “REPO CREATED!!!” in the chat to let me know you are ready to move on
Task Set 2
- Add a file from your computer to your repository with a descriptive commit message. It can be anything but keep in mind that if your repository is public the file will be findable online
- Create a new folder with a new file in it remembering that new folders are made in the file name box by typing text and then adding a / character. Don’t forget to add a filetype to your new file like .txt or .md as well as a nice commit message.
- Edit the README file in your repository by removing the text that is currently there and replacing it with something else.
- Look at the changes you made to your README file in the commit history by clicking the clock icon on the main page of your repository and opening the info page for that commit.
- Once you have done these tasks type “FULLY COMMITTED!!!” in the chat to let me know that you are ready to move on.
Task Set 3
- Ensure that GitHub Desktop is installed on your computer and then clone your repository to your computer using the green “Code” button on the main page of your repository and selecting “Open with GitHub Desktop”. Make sure to put the repository somewhere easy to find (by default GitHub should try to create a nice folder in your Documents)
- Fetch the origin of your repository (using the “Fetch Origin” button) to make sure that you have the most up to date version (this should only take a few seconds)
- Open the repository location on your computer (either by navigating to it or by clicking the “Show in explorer” button in GitHub Desktop) and edit one of the files in there and save your changes (anything other than the .git folder which should never be touched)
- Go back to GitHub Desktop and review the changes, then write a commit message and commit the changes.
- Push your changes to your online version of the repository
- When you are done type “BASICS MASTERED!!!!” in the chat to let me know that you are done
Next Steps
After completing this workshop, the recommended next steps are:
- Practice! It is always beneficial to practice the steps learned to keep them fresh in your mind. GitHub allows you to have unlimited repositories so explore any options that you are curious about!
- Check out the other workshops in our introduction to GitHub Series
This workshop is brought to you by the Brock University Digital Scholarship Lab. For a listing of our upcoming workshops go to Experience BU if you are a Brock affiliate or Eventbrite page for external attendees.