I'm running a maven build of a java project that is stored in a git repo. When the release plan runs on a build server (using Bamboo) it issues the following git command:
git log -n1 --date-order master
but recieves the following error:
fatal: ambiguous argument 'master': unknown revision or path not in the working tree.
I do, of course, have a master branch and when I pull down the repo and run the command locally it works fine. My guess is that there's different configuration on the build server but I'm at a loss for what to look for. I'm hoping one of you git experts will have some insight.
For reference, here is the actual error log I'm getting from the maven build. It occurs during the buildnumber-maven-plugin execution:
build 19-Aug-2015 15:10:28 [INFO] [INFO] --- buildnumber-maven-plugin:1.2:create (default) @ my-rest-project ---
build 19-Aug-2015 15:10:28 [INFO] [INFO] Verifying there are no local modifications ...
build 19-Aug-2015 15:10:28 [INFO] [INFO] Executing: /bin/sh -c cd /usr/local/atlassian/bamboo-home/xml-data/build-dir/MKL-RR-JOB1/target/checkout && git status --porcelain
build 19-Aug-2015 15:10:28 [INFO] [INFO] Working directory: /usr/local/atlassian/bamboo-home/xml-data/build-dir/MKL-RR-JOB1/target/checkout
build 19-Aug-2015 15:10:28 [INFO] [INFO] Executing: /bin/sh -c cd /usr/local/atlassian/bamboo-home/xml-data/build-dir/MKL-RR-JOB1/target/checkout && git log -n1 --date-order master
build 19-Aug-2015 15:10:28 [INFO] [INFO] Working directory: /usr/local/atlassian/bamboo-home/xml-data/build-dir/MKL-RR-JOB1/target/checkout
build 19-Aug-2015 15:10:28 [INFO] [ERROR] Provider message:
build 19-Aug-2015 15:10:28 [INFO] [ERROR] The git-log command failed.
build 19-Aug-2015 15:10:28 [INFO] [ERROR] Command output:
build 19-Aug-2015 15:10:28 [INFO] [ERROR] fatal: ambiguous argument 'master': unknown revision or path not in the working tree.
build 19-Aug-2015 15:10:28 [INFO] Use '--' to separate paths from revisions, like this:
build 19-Aug-2015 15:10:28 [INFO] 'git <command> [<revision>...] -- [<file>...]'