Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can you get the number of lines of code from a Github repository?

Technology
0
alan avak30 Posted

Can you get the number of lines of code from a Github repository?

0

Hello, you can do that by first cloning the repository to your local computer then counting lines. Supposing that you are using Linux or MacOS and that you have the git command installed; If you want to count lines of code of the PHP for example, you do:

 

git clone <git-url-of-the-repo>

cd <name-of-the-repo>

find . -name ‘*.php’ | xargs wc -l

 

Hope this answers your question.

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.