google gerrit repo, git commit如何自动生成Change-Id
2016-08-31 09:41
621 查看
1). 检查仓储.git/hook下面是否有 commit-msg 文件,如果没有到下面的地址下载:
http://review.cyanogenmod.org/tools/hooks/commit-msg
https://gerrit-review.googlesource.com/tools/hooks/commit-msg
如果有自己的gerrit-review服务器,可以直接在网址后面加上
添加后,每次执行git commit 都会自动在log里面生成 Change-Id,用于gerrit code review。
2). 如果是repo sync 下来的代码,随便找一个仓储,按上面的方法,检查是否存在 commit-msg 软链接(repo sync 是在每个仓储.git/hooks下面创建的软链接),如果不存在,修改工程目录下面
注意必须添加上面的
http://review.cyanogenmod.org/tools/hooks/commit-msg
https://gerrit-review.googlesource.com/tools/hooks/commit-msg
如果有自己的gerrit-review服务器,可以直接在网址后面加上
/tools/hooks/commit-msg即可下载。
添加后,每次执行git commit 都会自动在log里面生成 Change-Id,用于gerrit code review。
2). 如果是repo sync 下来的代码,随便找一个仓储,按上面的方法,检查是否存在 commit-msg 软链接(repo sync 是在每个仓储.git/hooks下面创建的软链接),如果不存在,修改工程目录下面
.repo/manifest.xml,注意这个xml文件也是软链接。
<remote name="aosp" review="review.source.android.com" fetch=".." /> <default revision="master" remote="aosp" sync-j="4" />
注意必须添加上面的
review="review.source.android.com"这句。至于为什么,可以查看.repo/repo 下面的 python脚本。
加入QQ群学习交流(GIT高手更高效):260858091
相关文章推荐
- google gerrit repo, git commit如何自动生成Change-Id
- 在SQL2008中,如何让id自动生成并自动递增?如何让时间默认生成?
- 在SQL2008中,如何让id自动生成并自动递增?如何让时间默认生成?
- 解决repo init 错误 fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
- Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
- git commit 中的change-id
- [Issue]repo/repo init-解决同步源码Cannot get http://gerrit.googlesource.com/git-repo/clone.bundle
- .gitignore 与 Change-Id 的生成
- Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
- Solr4.40 如何配置使用UUID自动生成id值
- Change-Id自动生成脚本
- oracle 如何实现主键id自增,或自动生成
- Solr4.0 如何配置使用UUID自动生成id值
- .git 文件夾拷貝出來 commit 缺少changeId
- Git Repo Gerrit方式下如何进行代码读权限控制
- Gerrit error when Change-Id in commit messages are missing
- 完美解决repo init 错误 fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
- (OK) fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
- Gerrit error when Change-Id in commit messages are missing
- repo init出现错误fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle解决方法