Connecting to GitHub
OverviewTeaching: 0 min
Exercises: 30 minQuestions
How will I keep track of changes in the EnviroDIY code library?
How do I share my code with collaborators?Objectives
Create a GitHub account, set up GitHub Desktop, and learn GitHub terminology.
This lesson will help you connect to GitHub, which is a web-hosting service for computer code repositories. This tutorial is hosted on GitHub, and the EnviroDIY Modular Sensor Library is also on GitHub. That means GitHub is the source code manager for the code you will be using, so you will benefit from using GitHub to keep track of updates to the EnviroDIY Modular Sensor Library. You may also find it to be a useful place to keep track of your own codes to manage versions and share will collaborators.
Episode 3: Connecting to GitHub
GitHub example use case
What is GitHub? is a short introduction to one group’s project using GitHub for collaboration. It’s a little bit silly, but we like how it introduces the vocabulary and workflow of GitHub.
The operative word for our use of GitHub is collaborative! It can be a place where you share files with collaborators, keep track of changes (version control, which is pretty much track changes on steroids; it’s excellent.), and collaborate even when you are not sitting together or working at the same moment.
Things you should know
Your activity on GitHub is public. Your content on GitHub is public (but credited to you as the owner/contributor). Private repositories (repos for short, defined as a storage place) exist, but they are not free. Don’t let this scare you away from interacting on GitHub, submitting issues, or making commits. As soon as you have a GitHub account you are qualified to help us improve this tutorial! Please submit your suggestions to the LearnEnviroDIY issues on GitHub.
- “Sign Up” for GitHub (create your own user account).
- In most cases we will be using code that others have contributed to GitHub, but you will need to create an account to be a GitHub user. As you create your account, consider using an email address that you will continue to use beyond this project. (If you need to change it some day, GitHub handles redirects well.)
- GitHub activity: Hello World.
- Your first GitHub activity will acquaint you with some of the jargon and functionality of GitHub by creating your own repository.
- Download and install GitHub Desktop.
- This software is a graphical user interface (GUI) to help you manage the files that you get from (pull) or send to (push) GitHub repositories. Having a Git Client will allow you to (mostly) avoid command line interaction with GitHub. There are other Git Clients available, and you are welcome to explore and use them. Our tutorials will be from the perspective of GitHub Desktop simply because that is what was available when the authors started. Sign in to GitHub desktop so it will be prepared to track your contributions.
- Install Git Client
- You will need this when you use PlatformIO in the next episode.
For your reference
GitHub is full of jargon. Here’s a glossary for GitHub.
GitHub is a collaborative version control system, where changes are tracked over an entire directory of files that is called a repository.
GitHub enables multiple edits to be saved in a commit, and for a different version to be developed in a branch.
When contributing to someone else’s repo, you ask them to pull your code edits into their code base by issuing a pull request