向openstack開發版本上傳代碼只需要在master分支上拉一個新的分支,修復之後上傳。
向穩定版本修復bug則要從穩定版本拉出一個分支,以cinder grizzly版本爲例,具體步驟如下:
1,更新本地庫到最新:
git checkout master
git remote update
git pull origin master
2,從穩定版本拉出一個分支:
git checkout -b bug/xxxxxx remotes/origin stable/grizzly
3,修改文件
4,上傳:
git add .
git commit -a -F .git\CMessage
git review stable/grizzly
CMessage 是對此次修改的說明,包括:
修改簡介
具體說明
Closes-bug: xxxxxx
Change-Id: --------
有了這個文件每次提交信息就不用重複輸入說明了。
參考:https://wiki.openstack.org/wiki/Documentation/HowTo#How_to_a_make_changes_to_a_stable_branch