72 lines
3 KiB
YAML
72 lines
3 KiB
YAML
uuid:
|
|
- value: 63d82a82-4f85-440b-85d6-8c6a0cd0b5d9
|
|
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:00+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: 'Rebase and reorder'
|
|
created:
|
|
- value: '2025-03-07T00:00:00+00:00'
|
|
changed:
|
|
- value: '2025-05-11T09:00:00+00:00'
|
|
promote:
|
|
- value: false
|
|
sticky:
|
|
- value: false
|
|
default_langcode:
|
|
- value: true
|
|
revision_translation_affected:
|
|
- value: true
|
|
path:
|
|
- alias: /daily/2025/03/07/rebase-and-reorder
|
|
langcode: en
|
|
body:
|
|
- value: |
|
|
<p>Sometimes when <a href="/daily/2025/02/11/tidy">tidying my commits</a> or updating a local branch with remote changes, the order of commits changes - making them out of order in when running <code>git log</code>.</p>
|
|
|
|
<p>I want the commits in the log to be in the correct sequential order.</p>
|
|
|
|
<p>If not, it would be confusing if I review the commits in the future.</p>
|
|
|
|
<p>This is easy to fix when running <code>git rebase -i</code> to perform an interactive rebase on the commits.</p>
|
|
|
|
<p>The commit has a <code>-x</code> or <code>--exec</code> option that will perform a given command on each commit.</p>
|
|
|
|
<p>The commit date can be reset using <code>git reset --amend</code>, and combining these commands will amend the date of each commit.</p>
|
|
|
|
<p>Running <code>git rebase --interactive --exec "git commit --amend --no-edit --date now"</code> will amend and update each commit, keeping the commit message the same, but changing the commit date to the current time - leaving the Git log in the correct order.</p>
|
|
|
|
|
|
format: full_html
|
|
processed: |
|
|
<p>Sometimes when <a href="/daily/2025/02/11/tidy">tidying my commits</a> or updating a local branch with remote changes, the order of commits changes - making them out of order in when running <code>git log</code>.</p>
|
|
|
|
<p>I want the commits in the log to be in the correct sequential order.</p>
|
|
|
|
<p>If not, it would be confusing if I review the commits in the future.</p>
|
|
|
|
<p>This is easy to fix when running <code>git rebase -i</code> to perform an interactive rebase on the commits.</p>
|
|
|
|
<p>The commit has a <code>-x</code> or <code>--exec</code> option that will perform a given command on each commit.</p>
|
|
|
|
<p>The commit date can be reset using <code>git reset --amend</code>, and combining these commands will amend the date of each commit.</p>
|
|
|
|
<p>Running <code>git rebase --interactive --exec "git commit --amend --no-edit --date now"</code> will amend and update each commit, keeping the commit message the same, but changing the commit date to the current time - leaving the Git log in the correct order.</p>
|
|
|
|
|
|
summary: null
|
|
field_daily_email_cta: { }
|