【发布时间】:2015-04-12 19:42:32
【问题描述】:
我正在开发一个包含多个 git 存储库的项目。文件夹结构如下所示;
repo1/
+
---repo2/
---repo3/
...
---repo8/
所以,要设置我的开发环境,我需要运行类似的东西;
git clone http://path_to_git_repo.git top_folder
cd top_folder
git checkout tags/release34
git clone http://path_to_another_repo.git subfolder1
cd subfolder1
git checkout tags/release55
cd ..
git clone http://path_to_another_repo.git subfolder2
cd subfolder2
git checkout tags/rel-44-abc
...等
大约一周后,不同的团队会推送他们自己的更新/标签,我需要通过这样做重新同步;
cd top_folder
git checkout tags/release44
cd subfolder1
git checkout tags/release-bignewfeature
cd ..
cd subfolder1
git checkout tags/release-reverting_tosomethingelse
cd ..
...等
进行整个重新同步非常...重复且令人厌烦。有人对我如何让自己更轻松有任何建议吗?
我听说过(并尝试过)mr 工具,但它只会更新到最新的 HEAD 版本的存储库,而我只需要更新到某些标签。
【问题讨论】: