"value":"\n <p>Sometimes when <a href=\"https:\/\/www.oliverdavies.uk\/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>\n\n<p>I want the commits in the log to be in the correct sequential order.<\/p>\n\n<p>If not, it would be confusing if I review the commits in the future.<\/p>\n\n<p>This is easy to fix when running <code>git rebase -i<\/code> to perform an interactive rebase on the commits.<\/p>\n\n<p>The commit has a <code>-x<\/code> or <code>--exec<\/code> option that will perform a given command on each commit.<\/p>\n\n<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>\n\n<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>\n\n ",
"format":"full_html",
"processed":"\n <p>Sometimes when <a href=\"https:\/\/www.oliverdavies.uk\/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>\n\n<p>I want the commits in the log to be in the correct sequential order.<\/p>\n\n<p>If not, it would be confusing if I review the commits in the future.<\/p>\n\n<p>This is easy to fix when running <code>git rebase -i<\/code> to perform an interactive rebase on the commits.<\/p>\n\n<p>The commit has a <code>-x<\/code> or <code>--exec<\/code> option that will perform a given command on each commit.<\/p>\n\n<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>\n\n<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>\n\n ",