混帐 - 如何从其他回购镜像文件 [英] git - how to mirror file from other repo

查看:140
本文介绍了混帐 - 如何从其他回购镜像文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个可能无法解决的问题,但我仍然会问。
我有一个git仓库,我需要从另一个镜像文件。
我需要在仓库中有一个.xsd文件。



这不是最大的问题。我想更新那个文件(例如git fetch)到包含.xsd文件的版本库上最后一个标签的版本。



任何帮助真的很感谢

解决方案

您可以使用结账后(或者更合适一些)挂钩用您需要的任何版本替换文件的最新版本,但是您将拥有未提交的文件。如果你需要的话,你可以在钩子中提交它(或者如果没有被追踪,就没有问题,如果没有看到问题的更多细节,很难说)。

I've a problem which probably can't be solved, but I'll ask anyway. I do have one git repository, and I need one file to be mirrored from another one. There is one .xsd file in the repo I need to have in my repository.

That's not the biggest problem. I want to update that file (on git fetch for instance), to the version of the last tag on the repository containing .xsd file.

Any help is really appreciated

解决方案

You can use post-checkout (or maybe some more appropriate) hook to replace the latest version of the file with any version you need, but then you will have an uncommitted file. You can commit it in the hook if you need that though (or if it is not tracked, there will be no problems, it's hard to say without seeing further details of the question).

这篇关于混帐 - 如何从其他回购镜像文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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