Git
Understand what a commit really is, and get yourself out of the states that usually cause panic.
For anyone who uses Git by copying commands and would rather know what they do. Assumes you have committed something before. The commands are the same on any platform.
Start: What a commit actually is- What a commit actually isA commit is a full snapshot with a parent, not a list of changes.2 min
- Branches are a pointer, and that is allA branch is a movable label on a commit, which is why branching costs nothing.2 min
- Merge and rebase: two ways to catch upMerge records what happened; rebase rewrites it to look tidier.3 min
- Undoing things without losing workMost Git accidents are recoverable, and the safe commands are the ones that add rather than rewrite.3 min