Git Tips
Reviving a discarded commit
You created a commit but then discarded it with git reset --hard <SHA>
without first syncing it with the server repository (GitHub). Use this PowerShell command to find the SHA of the discarded commit.
Get-ChildItem -Path .\.git\objects\??\* -Recurse | sort -Property CreationTime -Descending | select -first 1 | % { $_.FullName.Substring($_.FullName.Length-41).Replace('\', '') }