Skip to content

Instantly share code, notes, and snippets.

@tim-bellette
Created May 23, 2022 21:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tim-bellette/765802b16935409da26d2301e083609b to your computer and use it in GitHub Desktop.
Save tim-bellette/765802b16935409da26d2301e083609b to your computer and use it in GitHub Desktop.
PowerShell script to check if the current repo is at the HEAD of the origin
[regex]::Matches((git ls-remote origin refs/heads/main), "^([\w\d]*)").Value -eq (git rev-parse HEAD)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment