function List-Commits {
cd 'C:\Git'
$Commits = @()
Get-ChildItem . -Directory | % {
cd "$_"
if (Test-Path (Join-Path (Get-Location) '.git')) {
$Commits += git log --all --format="$($_)~%h~%ai~%s~%an" | ConvertFrom-Csv -Delimiter '~' -Header ('Project,Hash,Date,Message,Author'.Split(','))
}
cd ..
}
$Commits | ? Author -EQ "$(git config --get user.name)" | sort Date -Descending | Out-GridView -Title 'Commits'
}
This function iterates through Git repositories under the same parent folder (C:\Git in my case), builds a list of all the commits that you’ve authored (i.e. that match your user.name in Git config) and displays them in descending date order in a grid view.
Change the path in the second line to suit, or just remove it to have it search for repositories under the current directory.

I use it to remind myself what I’ve been working on over the last few days. Mostly for fun and only occasionally because I’m late filling in my timesheets… 🙄
Nice one! I had to set the user.name in config first to make it work
git config –global user.name “John Doe”
git config –global user.email johndoe@example.com
LikeLike
Thanks mate, glad you like it 👍 but when did you change your name to John Doe? 🤨
LikeLike