User notes that Visual Studio and VS Code's partial commit staging (hunking) is "half-baked" because it doesn't ensure that individual micro-commits actually build or are complete. Suggests a workflow involving stashing, building, testing, committing, then unstashing, implying a need for the tool to better support this.
Anyone using git who doesn't Hunk their commits is missing out. With most git clients, and with git on the command line, you can choose to commit only certain parts of a file (The excellent Fork client is really good at this). Those file parts are, for some reason, called Hunks. This means you can do something like add a missing docstring to a function signature, _and_ change the implementation of the function, at the same time, but put them in separate commits, like you did them one after the other. This is great because small granular commits are great. More granular commits will let you give more descriptive commit messages, which in turn are great in a number of ways: - easier to code review - easier to track down why a line was changed - easier to revert bad changes without removing other functionality - easier to git bisect https://lnkd.in/en9qmNhj to find the exact reason a bug was introduced Figure out how you can do hunk commits in your git client today, or if you use perforce, keep telling yourself that named changelists are better anyway. Did I miss any advantages of granular commits? Let me know below!