感謝this blog post我偶然發現了這個早晨格里特,我發現到解決方案了堅實的路徑!雖然它不完全簡單,它的強大,它的工作原理。
確保你已經創建了這個總括項目,你將重新爲這個子項目做父母,並執行以下步驟:
MYGERRIT=ssh://${MYGERRIT_IP}:${MYGERRIT_PORT}
mkdir ~/x
cd ~/x
# Clone the repo for the subproject you want to re-parent
git clone ${MYGERRIT}/<subproject>
cd <subproject>
git fetch origin refs/meta/config:refs/remotes/origin/meta/config
git checkout meta/config
# Make changes to project.config
-----> inheritFrom = <your_umbrella_project_name>
# Commit changes
git add -A
EDITOR=vi git commit -a
# Push changes
git push origin meta/config:meta/config # If pushing directly
#git push origin meta/config:refs/for/meta/config # If going through gerrit
# Flush gerrit caches
ssh -p ${MYGERRIT_PORT} ${MYGERRIT_IP} gerrit flush-caches --cache project_list
ssh -p ${MYGERRIT_PORT} ${MYGERRIT_IP} gerrit flush-caches --cache projects
Awsome,謝謝! – palacsint