git 获取branch名和commit id
获取分支名
git rev-parse --abbrev-ref HEAD
获取commit id
git rev-parse HEAD # 获取完整的commit id
git rev-parse --short HEAD # 获取短commit id
sdk_commit_id=`git log --abbrev-commit --pretty=oneline -1 | cut -c 1-7` # 获取短commit id