when you made a code change 2 months ago but completely forgot about it and why you did it

  • 7
    that's why version control exists, and code comments + commit messages matter.
  • 0
  • 1
    * cough * tests * /cough *
  • 0
    @tosensei yeah!

    And to expand on this: there’s often a debate over how terse the main branch commit history should be.
    My personal approach is that I will do a lot of commits in my working branch, submit a PR, ”squash and merge” my PR to make the main branch history terse - but if I ever wonder why the fuck I wrote something I can go back to the PR and dig through all the commits

    (This can be debated but is at least better than squashing the branch while you work on it - and losing the detailed commit history forever)
Add Comment