Ubuntu 16.04, pip install, version 0.24.2, python 3.6.4
The following happens because the metrics.auc file has not been added + committed to git:
rm -rf tmp
mkdir tmp
cd tmp
git init
dvc init
dvc run -M metrics.auc -f metrics.dvc 'echo "AUC: 0.9" > metrics.auc'
# Returns
dvc metrics show
# master:
# metrics.auc: AUC: 0.9
# Returns an error:
# Error: unexpected error - Cmd('git') failed due to: exit code(1)
# cmdline: git checkout master
# stderr: 'error: pathspec 'master' did not match any file(s) known to git'
dvc metrics show -a
It would be useful to tell the user to add + commit the files to the SCM.
Hi @tdeboissiere !
Great catch! We could just try to handle that empty repo case more gracefully. add and commit message is printed by the run command, but it is clearly not enough.
Related to https://github.com/iterative/dvc/issues/1009 .
Same issue here, but no error message. If you did not commit your accuracy metric file, dvc metrics show -a cannot switch branch, and displays equal metrics for all branches. Most clear from example:

dvc metrics show -a seem to work by using git checkout <branch>. If it cannot switch, it should display the git error message.
@timvink Thanks for the feedback! This issue is related to https://github.com/iterative/dvc/issues/1009 and will be fixed by using git show branch:file instead of doing git checkout.
Fixed by https://github.com/iterative/dvc/pull/1709 . Fix is already released, please feel free to upgrade. Thanks for the feedback guys! :slightly_smiling_face:
Most helpful comment
Same issue here, but no error message. If you did not commit your accuracy metric file,
dvc metrics show -acannot switch branch, and displays equal metrics for all branches. Most clear from example:dvc metrics show -aseem to work by usinggit checkout <branch>. If it cannot switch, it should display the git error message.