Everyday commands, and what can go wrong
Most Git incidents come from a command run without knowing exactly what it changes. This lesson walks you through a day of contributing, on the command line or in GitHub, so you understand the effect of each step and catch a mistake before it reaches the shared repository.
Lesson objective
By the end of this lesson, you will be able to chain the Git commands of a contribution day (clone, switch -c, status, diff, add -p, commit, push -u, fetch, pull, log) or their GitHub equivalents, knowing what each one changes and how to spot a mistake before it reaches the shared repository.
Topics covered
- Git commands
- Git command line
- GitHub without a terminal
- commit and push
- Git mistakes
Where it fits
Work on a branch, day to day
Which commands do I use, in what order, and how do I name my work?
Lessons in this module
- Everyday commands, and what can go wrong (this lesson)
- Branching strategy and commit messages
What you will learn in this module
This lesson is part of the course Git for PMs: ship as a team without putting production at risk
- Work on a short-lived branch with everyday Git commands (or their GitHub equivalents), small commits named by convention, and stay in sync with main.
Related courses
- Tech for PMsAll levelsNo prerequisites: accessible to everyone.
Explain how a web product works, from browser to server
2 hr 30 min
- Tech for PMsJuniorSome basics are useful: introductory knowledge of the topic.
Design and test an API integration as a PM
3 hr
- Tech for PMsJuniorSome basics are useful: introductory knowledge of the topic.
Model your product’s data and query it with SQL
3 hr 30 min