How to get the last commit ID of a remote repo using curl-like command?

git, git-commit

Solution

try this command

git log --format="%H" -n 1

Problem

I want to get the last commit ID of the remote git repo. The command `git rev-parse HEAD` works for a locally-cloned git repo, but I want to get it from the original GIT repo by a CURL command or so. Eg: I want to get the last commit ID of the git URL https://git.appfactorypreview.wso2.com/history/apiapp.git/. How?

Original source

Related problems