从Master中摘下单个文件

发布于 2025-01-24 08:55:10 字数 226 浏览 1 评论 0原文

我正在寻找解决问题的解决方案。
我有一个MonorePo,该monorepo在主分支中有一个文件,该文件已在每个合并中更新到主分支。
我希望其他分支(可能是主分支后面)在主分支中具有该文件的确切版本。



我的问题是:有没有办法将单个文件从主要分支提取到其他分支?
如果是这样,是否有办法使该过程自动?

我将Bitbucket用作SCM和VSCODE来提交/拉/推。

I'm looking for a solution for a problem I'm trying to solve.
I have a monorepo which has a file in the main branch that is getting updated in every merge to the main branch.
I want the other branches (which are likely behind the main branch) to have the exact version of that file in the main branch.

My question is: Is there a way to pull a single file from main to other branches?
And if so, is there a way to make that process automatic?

I use bitbucket as SCM and VSCode to commit/pull/push.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

躲猫猫 2025-01-31 08:55:10

我找到了一个解决方案。
git提取 - all
接下来
git Checkout Origin/Master-路径/到/文件

I've found a solution.
git fetch --all,
followed by
git checkout origin/master -- path/to/file

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文