正确的版本控制工作流程适用于多种存储库 [英] Proper version control workflow for a mixture of repositories

查看:100
本文介绍了正确的版本控制工作流程适用于多种存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

感谢您对以下内容的反馈(我是 Git 初学者)。我在 GitHub 上有一个关于我的论文研究的 artifacts 的公开回购(主要是软件,写在 R )。我想调整第三方 GitHub 回购,其中包含 LaTeX 论文模板(基本上,我想定期同步,合并更改,我想要/需要)。我为我的主项目目录结构中的稿件创建了相应的子模块。但是,现在我质疑这条路线是否最好(最佳)。我的问题

<1>上述任务的适当工作流程是什么?



2)对于手稿(在主目录结构内)而不是子模块,大致等价于使用分支 ?我问这个问题的原因是,似乎我用于几乎所有关于项目的工作( RStudio )似乎并不支持子模块(等待团队的确认),但它确实支持分支机构。如果这样的替换是有意义的,我是否仍然可以为模板同步我现在的分支(主要是只读模式,但能够向上游推送一些更改会很棒,如果它不支持子模块,但仍需要向上游推送更改,则可以考虑使用 strong> subtree 改为。

应用来自其他存储库的gradle文件中查看示例。



如果您坚持使用子模块,请注意,子模块可以自动跟随分支


Would appreciate your feedback on the following (I'm a Git beginner). I have a public repo on GitHub for my dissertation study's artifacts (mostly software, written in R). I'd like to adapt a third-party GitHub repo, containing LaTeX dissertation template (basically, I want to periodically sync with it, merging changes, which I want/need). I've created corresponding submodule for the manuscript within my main project directory structure. However, now I questioning whether this route is the best (optimal). My questions:

1) What is the proper workflow for the above-mentioned task?

2) Would is be an approximate equivalent to use a branch for the manuscript (within main directory structure) instead of a submodule? The reason I'm asking this is that it seems that the IDE I'm using for practically all my work on the project (RStudio) doesn't seem to currently support submodules (awaiting confirmation from the team), however it does support branches. If such replacement makes sense, would I still be able to sync my now branch for the template (mostly in a read-only mode, but it'd be great to be able to push some changes upstream, too).

解决方案

If it doesn't support submodule, but you still need to push changes upstream, you could consider using subtree instead.
See an example at "Apply gradle file from different repository".

If you stick with submodules, note that a submodule can automatically follow a branch.

这篇关于正确的版本控制工作流程适用于多种存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆