从远程Git仓库获取最新的提交记录 服务器 · 2022-04-24 // 获取默认分支的最新提交记录 git ls-remote $URL HEAD // 获取指定分支的最新提交记录 git ls-remote $URL refs/heads/masterLink:How to get the last commit ID of a remote repo using curl-like command?