forked from WilbertOnGithub/TFS2GIT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
readme
50 lines (31 loc) · 1.77 KB
/
readme
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Instructions on how to use this script can be found at
http://walkingthestack.wordpress.com/2010/09/21/importing-a-tfs-repository-into-a-git-repository-using-powershell/
Available parameters for this script:
-TFSRepository (mandatory)
The TFS repository you wish to import. Ie. $/repository.
-Server (optional)
The URL for your TFS server ex: https://tfs.acme.com/
-GitRepository (optional)
The name you want to give the Git repository. If no parameter is supplied, the default name will 'ConvertedFromTFS'.
-WorkSpaceName (optional)
During the import a temporary TFS workspace will be created. You can specify the name you wish to use for this workspace. Default 'TFS2GIT'.
-StartingCommit (optional)
You can import a sequential range of commits. Specify the first TFS commit you want to import.
When this parameter is used, EndingCommit must also be used.
-EndingCommit (optional)
You can import a sequential range of commits. Specify the last TFS commit you want to import.
When this parameter is used, StartingCommit must also be used.
-UserMappingFile (optional)
The script can convert TFS user accounts to Git accounts. For this to work you need to specify a user mapping file.
See the content of 'usermappings.txt' for an example.
-t (optional)
creates a lightweight tag on the first and last imported commits
Examples:
Converting a TFS repository with full history
.\tfs2git "$/TFS/repository/path" https://tfs.yourserver.com/ -UserMappingFile userMappings.txt
or
.\tfs2git -TFSRepository "$/TFS/repository/path"
Converting a TFS repository with a limited history
.\tfs2git -TFSRepository "$/TFS/repository/path" -StartingCommit 1 -EndingCommit 100
Converting a TFS repository while using a usermapping file
.\tfs2git -TFSRepository "$/TFS/repository/path" -UserMappingfile filename