From fef96fb27a8dc136ef8a16cc7064bfd1ab4c4134 Mon Sep 17 00:00:00 2001 From: Nick Charlton Date: Fri, 28 Mar 2025 13:11:52 +0000 Subject: [PATCH] Treat version history as a resource When composed with care, the version history in a code repository becomes a valuable resource for the future. For example, it allows you to use `git blame` to see how files changed and understand from the commit messages _why_ such changes were made, allowing you to understand the constraints under what those changes can be made and explain why the code was written that way. To do this, you should ensure you write enough detail for someone else (or perhaps yourself in future) to understand the change in depth. You should link to external resources, but understand that those can change and so a link alone is not enough. You should rebase to avoid messy ordering, and compose your changes with care so that they can be understood at a glance. --- git/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/git/README.md b/git/README.md index e0654667..feb81a34 100644 --- a/git/README.md +++ b/git/README.md @@ -4,6 +4,7 @@ A guide for programming within version control. ## Best Practices +- Treat the version history as a resource for the future. - Avoid merge commits by using a [rebase workflow]. - Squash multiple trivial commits into a single commit. - Write a [good commit message].