Skip to content

Instantly share code, notes, and snippets.

@mmodrow
Last active June 13, 2025 19:01
Show Gist options
  • Save mmodrow/7097645d812df6950cf09145e8b5a53e to your computer and use it in GitHub Desktop.
Save mmodrow/7097645d812df6950cf09145e8b5a53e to your computer and use it in GitHub Desktop.
Manually set current git commit date
[CmdletBinding()]
param (
[Parameter(Mandatory)]
[datetime]
$dateTime
)
$dateString = $dateTime.ToString("yyyy-MM-ddTHH:mm:ss")
git commit --amend --date=$dateString --no-edit --reset-author
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment