如何修复 Bitrise 脚本中的 Git 日志命令失败

What is to be done to fix Git log command failing from a Bitrise script

考虑:

git log --pretty="format: %s" master..HEAD

Bitrise 脚本步骤失败并出现以下错误:

fatal: ambiguous argument 'master..HEAD': unknown revision or path not in the working tree.

确保在 运行 提到的 git 日志命令之前 运行 下面的 git 命令。

git fetch --all

git branch --set-upstream master origin/master