1.2 - Basic workflow
git clone
git add
git status
git commit
git pull
git push
git log
git fetch
- Implement Git’s clone, add, status, commit, pull, and push operations on the command line.
- Explain where information is stored at each stage of that cycle.
Why teach this?
Implement Git’s clone, add, status, commit, pull, and push operations on the command line. - Understanding what the commands are doing in relation to the different elements involved, is no trivial task. Further, this should be actively involved in the class activities. Building a basic but functional initial representation of Git system could be a major challenge of any Git course teaching the basic workflow.
Explain where information is stored at each stage of that cycle. (extracted from The Carpentries) - This involves explicitly defining all the compartments the students should recognize to be able to use Git effectively (ie. what is the staging area, the index, the repository and the working directory?)
Mental Model

Activities
- The Carpentries - Version Control with Git - Tracking Changes
- Data Science 100 Timbers, Campbell, and Lee (2022)
- Code Refinery - Exercises - Record changes
- Git Kata - Git Kata: Basic Commits
- Git Kata - Git Kata: Basic Staging
- Learn enough Git to Be Dangerous - Michale Harti Our first commit - exercises
- Learn enough Git to Be Dangerous - Michale Harti Adding a tag -
git logexercise - Git Ruler (bot updated since 2018)
References
Timbers, Tiffany, Trevor Campbell, and Melissa Lee. 2022. Data Science: A First Introduction. CRC Press.