masterMainToHead function

This converts master or main to HEAD for a git repo