I am trying to read the latest commit for a git remote repository using this command
git ls-remote https://repo.myrepository.com/scm/swc/project.git refs/heads/qa
it works fine and returns me something like this
5261626431661281d788382a1ed6ab1440fd93a8 refs/heads/qa
But I am not able to find online any way to extract only the commit hash from the returned string in command line
I thought it would be very easy to find this information online, but the only answer I am finding everywhere is this
git ls-remote https://repo.myrepository.com/scm/swc/project.git refs/heads/qa | \ cut -f 1
But this does not work in windows command line, it says cut is not a recognized command.
Can anybody please help for windows command line version of it?
