将单个文件从一个分支合并到另一个分支可以吗? [英] Is it okay to merge individual files from one branch to another?

查看:109
本文介绍了将单个文件从一个分支合并到另一个分支可以吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在TFS,DEV,PRE和PROD中有三个分支设置。我的团队希望将DEV中的单个文件合并到PRE,以便代码在完成时可以输入测试。但是,我听说这不是一个好主意,如果需要这样做,就需要使用功能分支设置。有没有人对我们是否应该在如此精细的水平上进行合并提出任何建议(然后准备转移到生产环境时,我们将迁移整个分支机构)。

I have a three branch setup in TFS, DEV, PRE, and PROD. My team wants to merge individual files from DEV to PRE, so the code can enter test as they complete it. However, I've heard this is not a good idea, and that if we need to do that, we need to be using a feature branch setup. Does anyone have any recommendations on if we should or shouldn't be doing the merging at that fine level (and then when ready to move to production, we'd migrate the entire branch).

推荐答案

您通常希望合并变更集,而不是文件。如果有人签入影响了3个文件的更改,则仅合并其中一个文件可能会破坏某些内容。

You would typically want to merge changesets, not files. If somebody checked in a change that affected 3 files, merging just one of those files probably will break something.

这篇关于将单个文件从一个分支合并到另一个分支可以吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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