问题
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).
回答1:
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.
来源:https://stackoverflow.com/questions/25799319/proper-version-control-workflow-for-a-mixture-of-repositories