⛔ Squash commits considered harmful ⛔

This page summarizes the projects mentioned and recommended in the original post on dev.to

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • git-internals-pdf

    PDF on Git Internals

  • ❯ git log --graph --pretty=oneline --abbrev-commit --all * 150c57d (HEAD -> squash-merge) Squashed commit of the following: | * 535b740 (no-squash-merge) Merge branch 'work-branch' into no-squash-merge |/| | * 1836f1c (work-branch) And more | * 4b84cfe Add more |/ * 16660f8 (main) Add more * 02a154b Initial commit ❯ git cat-file -p no-squash-merge tree 58c1fb22faa444b264e98a5ae4c4ddb07be09697 parent 16660f8b1d1538ed1b55d8533b3ee7feb68e474c parent 1836f1c53221ae701a038bf5ae380770ea911665 author Manuel Odendahl 1653304391 -0400 committer Manuel Odendahl 1653304391 -0400 Merge branch 'work-branch' into no-squash-merge * work-branch: And more Add more squash-merges-considered-harmful on  squash-merge on ☁️ ttc (us-east-1) ❯ git cat-file -p squash-merge tree 58c1fb22faa444b264e98a5ae4c4ddb07be09697 parent 16660f8b1d1538ed1b55d8533b3ee7feb68e474c author Manuel Odendahl 1653304543 -0400 committer Manuel Odendahl 1653304543 -0400 Squashed commit of the following: commit 1836f1c53221ae701a038bf5ae380770ea911665 Author: Manuel Odendahl Date: Mon May 23 07:11:08 2022 -0400 And more commit 4b84cfe11aa51da994448e602e1bc4cc6083d691 Author: Manuel Odendahl Date: Mon May 23 07:11:03 2022 -0400 Add more * ``` {% endraw %} You can see that save that both {% raw %}`squash-merge`{% endraw %} and {% raw %}`no-squash-merge`{% endraw %} point to the exact same tree. The only changed thing is the commit message, and the missing parent in the squash merge. To read more about the underpinnings of git, I can recommend just experimenting with the git command line, and the following resources: - [Building Git by James Coglan](https://shop.jcoglan.com/building-git/) - [Git Internals by Scott Chacon](https://github.com/pluralsight/git-internals-pdf) ## But the history! But Manuel, you say, the history is so much cleaner! To which I counter that it is actually not. If you want to hide the link to the right parent of the non-squash merge (as it is called, the left parent being {% raw %}`main`{% endraw %} ), all you need to do is to hide it. If you use the command-line or a proper tool, use the option to only show first parents. If you only look at the first parent, and configure your git tool to fill in a full log history of the branch into the merge commit message (I personally use the github CLI {% raw %}`gh`{% endraw %} or some git-commit hooks to do it), the squash merge commit is identical to the non squash merge commit. A favorite {% raw %}`git log`{% endraw %} command of mine to quickly look at the history of the main branch, and create a changelog: {% raw %} ```shell > git log --pretty=format:'# %ad %H %s' --date=short --first-parent --reverse # 2022-05-23 02a154bc4f0fa9bca567676d45d136619c076a95 Initial commit # 2022-05-23 16660f8b1d1538ed1b55d8533b3ee7feb68e474c Add more # 2022-05-23 535b740f42e331175f3766c1374116e329a78f7e Merge branch 'work-branch' into no-squash-merge

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • tiktoken_ruby VS ruby-openai - a user suggested alternative

    2 projects | 3 May 2024
  • 5 Free Tools to Boost Developer Productivity

    1 project | dev.to | 3 May 2024
  • AsciidocFX: The Asciidoc Editor for documentation and authoring

    3 projects | dev.to | 2 May 2024
  • Sequel 5.80.0 Released

    1 project | news.ycombinator.com | 1 May 2024
  • HN who is hiring ratio (job seekers vs. jobs posted)

    1 project | news.ycombinator.com | 1 May 2024