Skip to content

Instantly share code, notes, and snippets.

@johnfredcee
Last active January 23, 2025 14:54
Show Gist options
  • Save johnfredcee/a0b8710d042114615a21b386a59322c1 to your computer and use it in GitHub Desktop.
Save johnfredcee/a0b8710d042114615a21b386a59322c1 to your computer and use it in GitHub Desktop.
Script to extract hashes for a particular author
<#
Script description.
Write a list of hashes and commit descriptions by a certian author to a file
#>
param (
# Name of committer
[string]$author = "John Connors",
# File to write hashes to
[string]$outfile = '.\commitlist.txt'
)
git log --author=$author --pretty=format:"%H:%s" | ForEach-Object { $_.Trim() } | Out-File -FilePath $outfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment