I confess: I created a git repo using sourcetree instead of git init or RStudio. Apparently this can lead to a repo in which the .git directory does not contains a hooks subdirectory. Even after you've made a commit. So when I attempt to use devtools::use_readme_rmd(), I hit this code in use_git_hook() and get Error: This project doesn't use git. Apparently there are other ways to have a valid git repo and yet NOT have a hooks subdirectory.
I admit this maybe a rare phenomenon. Not sure if a different error message is the way to go or just outright creation of hooks.
I confess: I created a git repo using sourcetree instead of
git initor RStudio. Apparently this can lead to a repo in which the.gitdirectory does not contains ahookssubdirectory. Even after you've made a commit. So when I attempt to usedevtools::use_readme_rmd(), I hit this code inuse_git_hook()and getError: This project doesn't use git. Apparently there are other ways to have a valid git repo and yet NOT have ahookssubdirectory.I admit this maybe a rare phenomenon. Not sure if a different error message is the way to go or just outright creation of
hooks.