My team alternates between usage of dev and master as default branch for several repos and I would like to write a script that checks for the default branch when entering a
There is a --short option to git symbolic-ref. So my preferred command:
$ git symbolic-ref --short HEAD master