• 4 Posts
  • 3 Comments
Joined 1 year ago
cake
Cake day: August 29th, 2023

help-circle
  • What is important to me is that when you open a pull request the commits in that pull request, the things you are requesting to be brought into the mainline, are in a good and final form. Meaning they are actually ready to be brought into mainline. That means each of them need to be logically chunked, clearly define and communicate the intent, etc. as I outlined in the article.

    Now, prior to that moment in time where you open the pull request. You can have your commits look like whatever horrible mess you want locally. Including if they are in a branch that you want locally that you aren’t going to integrate into mainline or open a pull request for.

    To facilitate this refinement of commits prior to this moment of opening a pull request. I personally use interactive rebase a lot as well as use https://git-ps.sh to facilitate a patch stack based workflow locally.

    I have found that organizing my commits according to the principles outlined in the article is extremely valuable even locally. It seems like most devs aren’t comfortable enough with git interactive rebase, etc. that facilitate refining commits as you go along. This is simply a skill issue that is well worth learning.

    If you take the stance in which you say it is my PR. Whatever commits are in there are whatever commits you created, with no logical separation, no clear commit descriptions explaining the intent of each of the changes you made. You then lose the benefits outlined in the article. Tools like git bisect won’t work properly, reverting commits sucks, etc.

    If you say, well what if we use GitHub to require that PR be integrated using a Squash & Merge? You still end up losing almost all of the benefits.

    So I think the dividing line needs to be that if you are requesting something to be integrated into mainline, or you are going to integrate something into mainline, you should follow the principles in the article. Otherwise, you are just taking the stance that you don’t care about the values outlined in the article.

    Which is a stance you can take. But those values being present or not based on your position is not opinion. That is fact, as it is provable by you simply testing out the things. So be careful not to fall into the trap of being like, “Well that is your opinion.”, and missing out on the fact that by having a different opinion you are factually losing out on the benefits.


  • In the example I provide the project that the PR was made for doesn’t have the linting passing as a build requirement. But that is irrelevant to the point I am trying to make which is to split things out base on those singular intents. Do you think that point was clear?

    Maybe I should change the example so that it isn’t based on linting which can be part of the build requirements but doesn’t have to be.


  • First of thanks so much for the feedback. I very much appreciate it.

    Conventional commit messages is something that I was contemplating putting in there. Though I consider it less of a core thing and more a layer that you can add on once you have the core stuff. I alluded to it in the following.

    There are many more things you can include in your commit messages and the template to help you. Some people add explicit change log entries to their commit messages that are targeted at the consumers of the product rather than the developers. Others manage sign-off from peer developers through commit message standards they have defined, etc.

    In my opinion, all these things can be valuable, and should be considered, but the above template really outlines the core that should always be present.

    The Consistent imperative form is something I do follow and just forgot to put it there. I will have to figure out a way to work Consistent Imperative Form in there fully and Conventional Commits linked in that section I quoted above as an example. So people are at least able to go look into it further themselves.

    Thanks again.