【发布时间】:2017-01-09 13:02:25
【问题描述】:
如何获取 Git 仓库中最新提交的作者?
#!/bin/bash
git_log=`git ls-remote git url master`
git_commitId = git_log | cut -d " " -f1
echo $git_commitId
cd /workspace
git_log_verify = `git rev-parse HEAD`
echo $git_log_verify
if $git_commitId =$git_log_verify then
cd /workspace
git_authorName=`git log --pretty=format:"%an"`;
echo $git_authorName
fi
【问题讨论】: