Interesting git helpers snippets

I would like to share some useful git snippets, which I’ve used in my git hooks. Snippets originally written in PowerShell but can be easily rewritten for your favorite language. Here are the full sources Get current branch name Safely resolve ref It returns hash of the valid ref, or $null for invalid ones. Test […]