Referring to this question How to get the git commit count? is there a way to read the value from somewhere (e.g.: a file) rather than executing a system command?
In my case, I want to be able to see the version (e.g.: send it as an HTTP response) of my node.js application as a simple number of git commit count, and I can't execute system commands, in this case git rev-list --all --count
. Is this command a dynamic operation that needs to communicate with the remote repository?
I looked into .git
folder but I can't find this specific number.