STORY

Incremental Git Commits

  • Incremental Git Commits

  • A developer workflow tip on the power of frequent commits and squashing before pushing.
  • The Workflow

    • In April 2023, I shared a tip on modern coding workflow that has served me well in software projects: 1. Before writing new code, ensure the current working state is committed in Git. 2. Add new code in small, incremental blocks, changing as little as possible. 3. Commit every time a new change works, even using a placeholder message like "WIP" (Work In Progress). 4. This provides a clear diff to review or share if a subsequent change breaks the build.
    • Before pushing to a shared repository, use a git rebase to squash the WIP commits into a single, clean progress commit.
These facts are as Randal recalls them, but much time has passed for most of this. If you find a factual error, please email realmerlyn@gmail.com.