So, how does this all work?
Let’s go over a quick overview of Github to illustrate some key concepts and vocabulary.
Remote Repository
To begin: In order to use Github, the files for a project should be stored in a folder. This folder is known as a repository or repo for short. Ultimately, the repository will be backed up to the cloud on Github’s servers; this cloud repository is known as the remote repository.
Clone
To work on a project, you will need to download the repository to your computer. The repository on your computer is known as the local repository. The action of copying the remote repository to your computer is known as cloning.
Commit
As you make changes to your project, you will want to periodically save and document your work. When you do so, the current state of your project is saved and added to the project’s version history. Each of these versions is known as a commit. Likewise the action of making these saves is also known as a commit or committing.
Push
At this point, the commits are only stored on your local computer. So, after making a few commits, you will want to upload your changes back to the remote repository. This will ensure that your work is backed up and that the remote repository is up to date. The action of uploading your changes to the remote is known as a push.
Additional Commits and Pushes
It’s worth noting that you only need to clone the repository once. Once you have a local copy, git will track all changes you make, so you can continue make additional commits and pushes quickly and efficiently.
Summary
Putting it all together:
New Vocabulary
Locations
- repository: The folder where the files for a project are stored.
- repo: A repository.
- remote: A repository stored on the cloud.
- local: The repository stored on your computer.
- commit: A saved version of a repository.
Actions
- clone: Downloading a remote repository to your computer.
- commit: Saving a version of a project and documenting the changes.
- push: Uploading commits to the remote repository.
(Note: There is a glossary of all the terms introduced in the workshop under the “Concepts” tab.)