I got this error because the instruction on the Web was
git checkout https://github.com/veripool/verilog-mode
which I did in a directory where (on my own initiative) i had run git init
.
The correct Web instruction (for newbies like me) should have been
git clone https://github.com/veripool/verilog-mode