Add-NonVolatileEnlistment
SYNOPSIS
Creates a TFS workspace intended for mappings that rarely change and can be synced infrequently.
SYNTAX
Add-NonVolatileEnlistment [-mappings] <String[]> [-tfsUrl <String>] [-localSourcePath <String>] [-branch <String>] [-branchToken <String>] [-localPathToken <String>] [-force] [<CommonParameters>]
PARAMETER
Mappings
List of mappings to include in workspace. These can be piped froman existing workspace and you can use the BranchToken and LocalPathToken to replace new server and local path values to be used for this workspace.
TfsUrl
The TFS Collection URL to use for connecting to TFS
LocalSourcePath
Local path where the workspace mappings should be rooted to
Branch
Server path from which to root mappings
BranchToken (optional)
String in the server path of the Mappings to be replaced with the Branch parameter
LocalPathToken (optional)
String in the local path of the Mappings to be replaced with the LocalSourcePath parameter. The default is 'c:\'.
Force (optional)
If a wokspace already exists that was not created by BigGit then add these mappings to that workspace
EXAMPLE 1
Invoke-TF workfold /workspace:"SomeOtherWorkspace;Matt Wrock" | Add-NonVolatileEnlistment -tfsUrl http://myserver:8080/tfs -localSourcePath "c:\dev\src\" -localPathToken "c:\" -Branch $/my/branch -BranchToken $/original/branch
This will create a new workspace based on the mappings of SomeOtherWorkspace and replace server path mappings starting with $/original/branch with $/my/branch and replace local path mappings starting with c:\ with c:\dev\src\
EXAMPLE 2
Invoke-TF workfold /workspace:"SomeOtherWorkspace;Matt Wrock" | Add-NonVolatileEnlistment -tfsUrl http://myserver:8080/tfs -localSourcePath "c:\dev\src\" -localPathToken "c:\"
This will create a new workspace based on the mappings of SomeOtherWorkspace and replace local path mappings starting with c:\ with c:\dev\src\. The server paths will be copied from the original mappings.
EXAMPLE 3
Add-NonVolatileEnlistment -mappings " $/my/branch/folder1: c:\dev\src\folder1"," $/my/branch/folder2: c:\dev\src\folder2" -tfsUrl http://myserver:8080/tfs -localSourcePath "c:\dev\src\"
This will create a new workspace and use the mappings passed in as is since no token parameters were used.
NOTES
The top level local paths created by the mappings will be symbolically linked into the workspaces created by
Add-PartialBranch,
Add-VolitileEnlistment and
Add-PartialBranchGitClone.