uuid: - value: cc44360f-4d47-4899-9f3b-d4a88c4f7eca langcode: - value: en type: - target_id: daily_email target_type: node_type target_uuid: 8bde1f2f-eef9-4f2d-ae9c-96921f8193d7 revision_timestamp: - value: '2025-05-11T09:00:03+00:00' revision_uid: - target_type: user target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849 revision_log: { } status: - value: true uid: - target_type: user target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849 title: - value: 'Local merging and squashing' created: - value: '2024-12-12T00:00:00+00:00' changed: - value: '2025-05-11T09:00:03+00:00' promote: - value: false sticky: - value: false default_langcode: - value: true revision_translation_affected: - value: true path: - alias: /daily/2024/12/12/local-squashing langcode: en body: - value: |

Because I do trunk-based development, I typically don't create branches in Git.

If I do, I usually want to keep the commit messages, but there are some situations where I want to squash everything into a single commit with a simple message.

Typically, I'd do this using a rebase command like git rebase -i main and get an output like this, showing the commits:

pick d21fafc Remove encrypted disk configuration
      pick ffc1296 Update mount location for media directories
      pick 58f645e Add multigrep from TJ's video
      pick bbd5052 Revert "Remove encrypted disk configuration"
      pick 8280c49 Show more generations on boot
      pick d3b0c48 Revert "Add encrypted media drive"
      pick 8cdc6a5 Add paperless-ngx
      pick 73d801d Add Nick Janetakis' `notes` script
      pick 99b6e3b Set options for text files
      

I can change pick to squash or fixup and decide what to do for each commit.

squash combines the commit with the previous one, including the commit messages.

fixup uses the previous commit message and discards the current one.

Once the file is saved, the rebase is performed and the actions are executed.

There is another way

If you don't want any of the commit messages, you can also use git merge --squash.

This will automatically squash all the commits - ready for you to run git commit and provide the final message.

There's no option to merge or combine the previous messages, though.

If you want to do that, you can still use the rebase approach.

If not, use git merge --squash.

format: full_html processed: |

Because I do trunk-based development, I typically don't create branches in Git.

If I do, I usually want to keep the commit messages, but there are some situations where I want to squash everything into a single commit with a simple message.

Typically, I'd do this using a rebase command like git rebase -i main and get an output like this, showing the commits:

pick d21fafc Remove encrypted disk configuration
      pick ffc1296 Update mount location for media directories
      pick 58f645e Add multigrep from TJ's video
      pick bbd5052 Revert "Remove encrypted disk configuration"
      pick 8280c49 Show more generations on boot
      pick d3b0c48 Revert "Add encrypted media drive"
      pick 8cdc6a5 Add paperless-ngx
      pick 73d801d Add Nick Janetakis' `notes` script
      pick 99b6e3b Set options for text files
      

I can change pick to squash or fixup and decide what to do for each commit.

squash combines the commit with the previous one, including the commit messages.

fixup uses the previous commit message and discards the current one.

Once the file is saved, the rebase is performed and the actions are executed.

There is another way

If you don't want any of the commit messages, you can also use git merge --squash.

This will automatically squash all the commits - ready for you to run git commit and provide the final message.

There's no option to merge or combine the previous messages, though.

If you want to do that, you can still use the rebase approach.

If not, use git merge --squash.

summary: null field_daily_email_cta: { }