You direct your Git history, it does not direct you.
Preamble
Core concepts
- "where I am" =
HEAD
(alias @
)
- "branch" = tag that moves
Timeless advice
- Visualize your history
- Feature branches: rebase on a fresh master often
- History should always be functionally linear (for a given permanent branch)
- Merge = bad. Never merge. Always rebase.
- If Git complains unexpectedly, take a step back.
- Keep your history clean.
- Git history follows the same principles as code
- Git is about tracking incremental changes and dependencies.
Pro-tips
- Make trivial commits for file renames, changes to dependencies