openstack git git-review

来源:互联网 发布:查看域名真实ip 编辑:程序博客网 时间:2024/06/05 18:18

Openstack git 操作

环境信息

[root@bogon ~]# cat /etc/redhat-releaseCentOS Linux release 7.3.1611 (Core)

安装 git

[root@bogon ~]# yum install git -y[root@bogon ~]#  git config --global user.name "yenai"[root@bogon ~]#  git config --global user.nameyenai[root@bogon ~]# git config --global user.email "yenai_2008@126.com"[root@bogon ~]# git config --global user.emailyenai_2008@126.com

安装 git-review(需要先安装 EPEL 源)

[root@bogon ~]# yum install -y epel-release[root@bogon ~]# yum clean all && yum makecache[root@bogon ~]# yum install git-review -y

生成公密钥,并上传公钥到 git-review,clone 仓库代码

[root@bogon ~]# ssh-keygen -t rsafork 分支到自己的账户,地址:https://github.com/openstack/cindergit clone 到本地[root@bogon yenai]# git clone https://github.com/yenai2009/cinder.git如果 fork 文件不是最新的代码,添加远程仓库,拉取到本地,提交到自己的仓库[root@bogon cinder]# git remote add cinder_master https://github.com/openstack/cinder.git[root@bogon cinder]# git remote -v[root@bogon cinder]# git fetch cinder_master[root@bogon cinder]# git merge cinder_master/master[root@bogon cinder]# git push origin master

后续的就是常规的 git 操作了,修改点先提交到自己的仓库,最后通过 new pull request 提交给社区 或者使用 get-review 提交

Accessing Gerrit over HTTPS

[root@bogon cinder]# git remote add gerrit https://yenai2009@review.openstack.org/openstack/cinder.git[root@bogon cinder]# git remote -v[root@bogon cinder]# git review -s[root@bogon cinder]# git reviewYou are about to submit multiple commits. This is expected if you aresubmitting a commit that is dependent on one or more in-reviewcommits. Otherwise you should consider squashing your changes into onecommit before submitting.The outstanding commits are:c69c5bd (HEAD, origin/master, origin/HEAD, master) setup.py roll back3100873 test pull request4446802 yenai test delete4d370f9 yenai testDo you really want to submit the above commits?Type 'yes' to confirm, other to cancel:

参考资料:
Openstck Developer’s Guide
Openstck contributor guide
Setup git
廖雪峰 使用GitHub

0 0
原创粉丝点击