- Do product managers need to use Git in the terminal?
- Mostly no. Everything our Git course teaches happens in the GitHub web interface, from reading history to reverting a pull request. These basic Git commands matter when the terminal shows up anyway: an engineer sends you one, you have a local copy of the repository, or you want to run a pull request yourself. Every command here that has a browser equivalent shows it.
- What's the difference between git revert and git reset?
- git revert undoes a commit by adding a new commit that reverses it; history keeps both, so it is safe on a shared branch like main. git reset moves your branch back to an earlier commit; with --hard it also throws away uncommitted work, and on a shared branch it rewrites history for everyone. When in doubt, revert.
- How do I check whether a fix is already released?
- Find the commit hash of the fix (on the merged pull request) and run git tag --contains with it. The tags listed are the releases that include it; an empty list means it is merged but not released yet. On GitHub, the commit page shows the same tags under the commit message.
- Is git pull safe to run?
- Usually. It brings the latest commits of your branch from GitHub and merges them into your folder, so your files change. If you and someone else edited the same lines, it stops with a conflict that you resolve or cancel with git merge --abort. To only look at what's new, run git fetch instead: it changes nothing.
- What does "force push" do, and why do engineers avoid it on shared branches?
- A normal push only adds commits. A force push replaces the branch on GitHub with your version, so commits that aren't in your version disappear from it, and everyone who built on them has to repair their copy. That's why teams protect main against it and use --force-with-lease only on their own branches.
- What's the difference between Git and GitHub?
- Git is the version control tool: it records the history of a project on any computer. GitHub is a website that hosts Git repositories and adds pull requests, reviews, issues and releases on top. The git commands work with any host; the gh commands and the browser paths on this page are GitHub's.
- What do the words in angle brackets mean?
- They are placeholders. In git show <commit>, replace <commit> with a real hash such as 3f9a2c1 and drop the brackets: git show 3f9a2c1. They stay in English in both languages because that is how engineers write them.
- Does the trainer save my answers anywhere?
- Only in this browser: how many times you got each situation right or wrong, the number of rounds and your best score. No answers, no text, nothing is sent to us. "Reset progress" clears it, with an Undo for a few seconds.