从本地工作区分支
我正在开发团队项目,突然意识到我做了很多更改,我需要创建分支。
我从未在 TFS 中使用过分支,当我看到“分支\”来自工作空间版本”时,我想这就是我所需要的。但是这个选项并不像我想象的那样。
我如何从我的“本地”创建新分支项目的副本”并包括所有本地更改”?我上面提到的选项创建了类似分支的东西...我不知道确切的分支是什么,但我确信,这不是来自我的本地版本的所有更改。正如我注意到的,生成的分支没有我添加的文件和项目。
I was developing team project and suddenly realised that i've made so many changes, that i need create branch.
I've never used branching in TFS and when i saw "Branch\ "From Workspace version" i thought that's, what i need. But this option doesn't act as i supposed.
How can i create new branch, from my "LOCAL COPY of Project" and include all local changes"? The option that I mentioned above creates something like branch from...i don't know exacly from what, but i know for sure, that not from my local version with all changes. As i noticed, generated branch doesn't have files and project which i added.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我要做的是:
这样,您将获得一个干净的分支,并获得所做更改的记录。
What I would do is:
That way, you get a nice clean branch, and you get a record of the changes you have made.
运行以下命令替换搁置集名称以及您自己的目录结构:
如果搁置集名称包含空格,则需要在搁置集名称周围加上引号)
这应该可以帮助您避免我在使用时遇到的一些问题试图遵循最初的指示。
Run the following command replacing the Shelve set name and directory structure with your own:
(quotes around shelveset name are required if it contains spaces)
This should help you avoid some of the problems I ran into when I was trying to follow the original instructions.
Robaticus 的答案是正确的,但我想添加一些我在其他地方没有明确说明的细节。我只需要这样做,它看起来好像有效,但事实并非如此。它会假装自动合并或复制,但没有创建文件,也没有在新分支中进行签出。应该会引发错误,但没有出现任何错误。
事实证明,如果路径没有空格,则源和目标周围的引号是可选的,但如果存在空格,则它们是必需的。
这是一个模板:
Robaticus's answer is correct, but I wish to add some detail that I haven't seen explicitly stated elsewhere. I just had to do this and it acted like it was working but it wasn't. It would pretend to automerge or copy, but no files were created, and no checkouts were made in the new branch. An error should be raised, but none appears.
It turns out that the quotes around the source and target are optional if the paths have no spaces, but they are required if spaces exist.
Here's a template:
您可能想尝试一下这个:
我假设您正在使用 Eclipse IDE 和 TFS 插件。您需要成为该项目的 TFS 管理员。
输入团队 Foundation Server 详细信息以连接它,并选择适当的分支/项目来进行更改。您还可以通过 TFS 控制面板创建一个新文件夹。
共享所选分支/文件夹中的项目。
(这只是将项目添加到 TFS - 您需要立即检查)
在“团队”菜单中,您会找到签入更改选项。
干杯!
You may want to try this one:
I am assuming you are using Eclipse IDE and TFS Plugin. You need to be a TFS Administrator for the project.
enter team Foundation Server details to connect it and select the appropriate Branch/Project to put your changes. You can also create a new folder by TFS Control Panel.
Share the project in the selected branch/folder.
(THIS IS JUST ADDING PROJECT TO TFS-YOU NEED TO CHECKIN NOW)
in the "Team" menu you will find checkin changes option.
Cheers!