I got stuck on this for a bit so I figure this might be useful to someone.
Git will not automatically update your local repository's default branch if the remote's default branch changes. So, if you change your default branch from master to develop, any copies of the repo cloned prior to the change will think master is the default branch, while any copies after the change will think develop is the default branch. This can cause the script to offer differing results depending on the machine you're on.
Solution: git remote set-head origin -a will update the branch that git considers the origin/HEAD to match the current default branch in the origin remote.
Source: Stack Overflow