Counting lines in GitHub repository
cloc can also count the codes written in different files in the GitHub repository. Now let’s clone cloc GitHub repository. To count the number of lines in the GitHub repo the following command:
cloc commit
First, clone the repository and use the cloc.
git clone https://github.com/AlDanial/cloc cd cloc cloc ec44eb0
cloc provide many other options. To know more about the cloc read the man page of cloc.
man cloc
CLOC – Count number of lines of code in file
cloc is a command-line-based tool. It counts the blank lines, comment lines, actual code lines written in many programming languages. cloc is completely written in the Perl language, and it has no external dependencies. cloc can run on many operating systems like Linux, macOS, Windows, OpenBSD and many more.