嵌入 git 存储库来跟踪我们的更改?
与 git 的子模块功能类似,我想将远程存储库的克隆嵌入到我自己的存储库中。但是,我希望能够对我们的嵌入式版本进行更改,同时仍然保持从远程获取更新的能力。我不知道如何使用子模块来做到这一点。这在功能上可能吗?现在,我只是将远程源目录复制到我的存储库中,虽然这允许我跟踪本地更改,但它失去了从远程存储库提取更新或管理分支的能力。
Similar to git's submodule functionality, I'd like to embed a clone of a remote repository in my own. However, I would like the ability to make changes to our embedded version while still maintaining the ability to pull updates from the remote as well. I don't see how I can do this with a submodule. Is this functionally possible? Right now I just have the remote source directory copied into my repository and while that allows me to track my local changes, it loses the ability to pull updates from the remote repository or manage branches.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
根据您的情况,您可能需要子树: http://help.github.com/subtree-merge/< /a>.如果需要更新,您可以在 Makefile 或 cron 中拉取并更新子树。
Depending on your situation you may want subtrees: http://help.github.com/subtree-merge/. You can pull and update the subtree in a Makefile or cron if you need to be up to date.
过去,我使用 braid 来管理这个: https://github.com/evilchelu/braid/维基百科/
In the past, I have used braid to manage this: https://github.com/evilchelu/braid/wiki/