何时使用标签/标签,何时使用分支? [英] When to use a Tag/Label and when to branch?

查看:37
本文介绍了何时使用标签/标签,何时使用分支?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 TFS,什么时候标记代码,什么时候分支?

Using TFS, when would you label your code and when would you branch?

TFS 中有 mainline/trunk 的概念吗?

Is there a concept of mainline/trunk in TFS?

推荐答案

TFS 中的标签是一种标记文件集合的方式.标签包含一堆文件和文件的版本.这是一种标记哪些版本的文件构成构建等的成本非常低的方法.

A label in TFS is a way of tagging a collection of files. The label contains a bunch of files and the version of the file. It is a very low cost way of marking which versions of files make up a build etc.

一个分支可以被认为是 TFS 中不同目录中文件(某个版本)的副本(TFS 知道这是一个分支并且会记住它是哪个文件和版本的一个分支).

A branch can be thought of as a copy of the files (of a certain version) in a different directory in TFS (with TFS knowing that this is a branch and will remember what files and versions it was a branch of).

正如 Eric Sink 所说,一个分支就像一只小狗.它需要一些照顾和喂养.

As Eric Sink says, a branch is like a puppy. It takes some care and feeding.

就我个人而言,我经常标记但很少分支.我为每个构建创建一个标签,但只有在我知道我需要处理历史版本或需要与主代码行隔离工作时才分支.您可以从任何时间点创建一个分支(以及一个标签),这样效果很好,并且意味着我们周围没有未使用的分支.

Personally, I label often but branch rarely. I create a label for every build, but only branch when I know that I need to work on a historical version or that I need to work in isolation from the main line of code. You can create a branch from any point in time (and also a label) so that works well and means that we don't have branches lying around that are not being used.

希望有所帮助,

马丁.

这篇关于何时使用标签/标签,何时使用分支?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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