oliverdavies.uk/content/node.9a9bcb91-1a60-4126-8a14-d477544568d1.yml

88 lines
3.8 KiB
YAML

uuid:
- value: 9a9bcb91-1a60-4126-8a14-d477544568d1
langcode:
- value: en
type:
- target_id: daily_email
target_type: node_type
target_uuid: 8bde1f2f-eef9-4f2d-ae9c-96921f8193d7
revision_timestamp:
- value: '2025-05-11T08:59:58+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: 'Dont commit changes with `-m`'
created:
- value: '2025-04-02T00:00:00+00:00'
changed:
- value: '2025-05-11T08:59:58+00:00'
promote:
- value: false
sticky:
- value: false
default_langcode:
- value: true
revision_translation_affected:
- value: true
path:
- alias: /daily/2025/04/02/commit
langcode: en
body:
- value: |
<p>A common thing I see when reading posts or watch videos where people are using Git is using the <code>-m</code> option when committing changes.</p>
<p><code>-m</code> allows you to specify the commit message inline or, more specifically, the first line of the commit message.</p>
<p>If you think of a commit message as an email, the first line is the subject line which is followed by the body of the message.</p>
<p>If you don't use <code>-m</code>, Git will open an editor and you can type the full commit message into a file and save it.</p>
<p>This includes the subject line and, more importantly, the body of the message where you can include as much additional information as you want.</p>
<p>The subject line summarises the change, but the body can be used to explain why it was needed.</p>
<p>You can describe the issue or requirements in more detail (don't just link to the issue or enter the issue number).</p>
<p>You can describe any other approaches you considered or tried.</p>
<p>You can describe any anticipated effects or consequences of this commit, any manual deployment steps or follow up tasks that will need to be created.</p>
<p>You can include any additional information you were aware of at the time of making the commit that could be useful to yourself or others in the future.</p>
<p>Think what information would you like to see when you next run <code>git log</code>.</p>
format: full_html
processed: |
<p>A common thing I see when reading posts or watch videos where people are using Git is using the <code>-m</code> option when committing changes.</p>
<p><code>-m</code> allows you to specify the commit message inline or, more specifically, the first line of the commit message.</p>
<p>If you think of a commit message as an email, the first line is the subject line which is followed by the body of the message.</p>
<p>If you don't use <code>-m</code>, Git will open an editor and you can type the full commit message into a file and save it.</p>
<p>This includes the subject line and, more importantly, the body of the message where you can include as much additional information as you want.</p>
<p>The subject line summarises the change, but the body can be used to explain why it was needed.</p>
<p>You can describe the issue or requirements in more detail (don't just link to the issue or enter the issue number).</p>
<p>You can describe any other approaches you considered or tried.</p>
<p>You can describe any anticipated effects or consequences of this commit, any manual deployment steps or follow up tasks that will need to be created.</p>
<p>You can include any additional information you were aware of at the time of making the commit that could be useful to yourself or others in the future.</p>
<p>Think what information would you like to see when you next run <code>git log</code>.</p>
summary: null
field_daily_email_cta: { }