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 directory.
When pull requests are opened in some of these repos, they either default to 'dev' or 'master' as the merge target.
I understand how to set this information but not retrieve it: https://help.github.com/articles/setting-the-default-branch/
Is there a git command available to determine default branch for remote repository?
See Question&Answers more detail:os