1.1 - Git and GitHub
- Differentiate between GitHub as a remote hosting service for version control and Git as a version control system.
- Explain the purpose of the
.git
directory.
Why teach this?
Differentiate between the use of GitHub as a remote hosting service for version control and Git as a version control system
- Are Git and GitHub the same thing? The first step towards building a mental model of Git and GitHub is to understand what these tools, called Git and its online counterpart GitHub, are for.
Explain the purpose of the .git
directory.
Similar to teaching chemistry, explanations about the structure of a molecule are impossible to demonstrate directly and will need representations. When it comes to
.git
, we have to explain it as a necessary element to be able to use the commands and Git well.To gain a clear understanding of the difference between clone and download from GitHub. Cloning is not ONLY downloading the material, it is also downloading the history of the project.
To prevent errors.
There are many errors that can occur when you save a Git directory inside another Git project folder. Nested projects including.git
folders are not easy to detect if you have no idea how to recognize a Git repository.
Are your students ready for Git? Do they know about…
…the file system?
What is the working directory? What is the home directory? If this is the first time that the students are working with this vocabulary, Glossario is a multilingual glossary for computing and data science terms.…hidden folders?
The.git
folder is a hidden folder. Are the students familiar with this concept? How can they confirm that it is a hidden folder? The Carpentries lesson about Git has good material about it.…the command line?
Are the students familiar with the use of the command line? If it is not the case there are many IDEs as RStudio, VSCode or Jupyter Lab that provide interfaces to access the commands. The Carpentries lesson about UNIX Shell is good resource to extract exercises and other valuable material. If your students already know about the command line, providing there is more advanced material that can also be provided or taught Aliases and other advanced configuration could be an option.
Mental Model
Activities for the students
Data Science - A first Introduction (worksheets) Activities to create a repository on GitHub
The Carpentries - Version Control with Git - Creating a repository
The Carpentries - Data Carpentry -Git in GitHub
Code refinery - Introduction to Version Control with Git Here you will find the list of exercises.
Happy git with R - workshops and activities In this book there are listed workshops where you can find material about this first topics.