I wanna count to total lines of codes in git repository. I've found the answer in google.
git ls-files -z | xargs -0 cat | wc -l
It works well in local repository.
but. I want to count in remote repository.
so, I tried.
git ls-files -z /home/bjyoo/repositories/root/localfiletest.git | xargs -0 cat | wc -l
,
git ls-files -z --git-dir=/home/bjyoo/repositories/root/localfiletest.git | xargs -0 cat | wc -l
and
git --git-dir=/home/bjyoo/repositories/root/localfiletest.git --ls-files | xargs -0 cat | wc -l
all command failed.
does anyone knows how to count total lines of code?