File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
book/09-git-and-other-scms/sections Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 3
3
4
4
(((TFS)))(((Importing, from TFS)))
5
5
如果你的团队正在将他们的源代码管理从 TFVC 转换为 Git,你们会想要最高程度的无损转换。
6
- 这意味着,虽然我们在之前的交互章节介绍了 git-tfs 与 git-tf 两种工具,我们在本部分只能介绍 git-tfs,因为 git-tfs 支持分支,而使用 git-tf 代价太大。
6
+ 这意味着,虽然我们在之前的交互章节介绍了 git-tfs 与 git-tf 两种工具,但是我们在本部分只能介绍 git-tfs,因为 git-tfs 支持分支,而使用 git-tf 代价太大。
7
7
8
8
[NOTE]
9
9
====
12
12
====
13
13
14
14
第一件事是映射用户名。
15
- TFVC 对待变更集作者字段的内容相当宽容,但是 Git 想要人类可读的名字与邮箱地址 。
15
+ TFVC 对待变更集作者字段的内容相当宽容,但是 Git 需要人类可读的名字与邮箱地址 。
16
16
可以通过 `tf` 命令行客户端来获取这个信息,像这样:
17
17
18
18
[source,powershell]
40
40
41
41
左边的部分是 TFVC 中的 ``User'' 字段,等号右边的部分是将被用作 Git 提交的用户名。
42
42
43
- 一旦有了这个文件,下一件事就是生成一个你感兴趣的 TFVC 项目的完整克隆:
43
+ 一旦有了这个文件,下一件事就是生成一个你需要的 TFVC 项目的完整克隆:
44
44
45
45
[source,powershell]
46
46
----
47
47
PS> git tfs clone --with-branches --authors=AUTHORS https://username.visualstudio.com/DefaultCollection $/project/Trunk project_git
48
48
----
49
49
50
50
接下来要从提交信息底部清理 `git-tfs-id` 区块。
51
- 下面的命令会完成它 :
51
+ 下面的命令会完成这个任务 :
52
52
53
53
[source,powershell]
54
54
----
@@ -57,4 +57,4 @@ PS> git filter-branch -f --msg-filter 'sed "s/^git-tfs-id:.*$//g"' -- --all
57
57
58
58
那会使用 Git 终端环境中的 `sed` 命令来将所有以 ``git-tfs-id:'' 开头的行替换为 Git 会忽略的空白。
59
59
60
- 那些全部完成后,你就已经做好准备去增加一个新的远程仓库 ,推送你所有的分支上去,然后你的团队就可以开始用 Git 工作了。
60
+ 全部完成后,你就已经准备好去增加一个新的远程仓库 ,推送你所有的分支上去,然后你的团队就可以开始用 Git 工作了。
You can’t perform that action at this time.
0 commit comments