diff --git a/dvc/scm/git/__init__.py b/dvc/scm/git/__init__.py index 3872c8e72e..2d334a6493 100644 --- a/dvc/scm/git/__init__.py +++ b/dvc/scm/git/__init__.py @@ -250,7 +250,7 @@ def list_all_commits(self): def _install_hook(self, name, cmd): command = ( '[ "$3" = "0" ]' - ' || [ -z "$(git ls-files .dvc)" ]' + ' || [ -z "$(git ls-files --full-name .dvc)" ]' " || exec dvc {}".format(cmd) )