在TFS中使用git分支名称

时间:2017-02-13 04:24:53

标签: git tfs

我正在使用带有git源代码控制存储库的Team Foundation Server。我希望能够用/字符分隔单词命名分支,例如“dev / feat / button”。 Git支持这一点但是TFS构建系统遇到了名称中的/的问题。它正确地创建了目录,但是在清理目录时遇到了问题,因为它认为整个“dev / feat / button”是一个文件,而不是一组嵌套的目录。有没有人能够让这个工作?

2 个答案:

答案 0 :(得分:1)

如git-tfs所示,您不能在TFS分支名称中使用'/',因为TFS has this notion of branch path

A <- B <- C <- D <- E  $/Repository/ProjectTrunk
           \                              
            M <- N     $/Repository/ProjectBranch

这与Git非常不同,Git的分支只是图表中的一组提交。

答案 1 :(得分:1)

我在TFS 2015.3中通过创建名为dev/test的分支:

进行了测试

enter image description here

然后在TFS构建中,选择此分支:

enter image description here

TFS构建可以毫无问题地获得此分支:

enter image description here