Add-PartialBranchGitClone

SYNOPSIS

Clones a GIT repository from a TFS server path

SYNTAX

Add-PartialBranchGitClone [[-tfsUrl] <String>] [[-branch] <String>] [[-localSourcePath] <String>] [[-remoteOrigin] <String>] [<CommonParameters>]

DESCRIPTION

This is intended to be the git clone of the partial branch creatred by Add-PartialBranch. It uses git-tf to clone the TFS server path specified in the Branch argument to a git repository located at the path specifile in the LocalSourcePath argument. If a RemoteOrigin argument is provided, a origin Remote is added to the repository pointing to the path given in that parameter. A bare git repo of the repo just created is then cloned to that path. Autocrlf is set to false and ignorecase is set to true. If a NonVolatile workspace was created using Add-NonVolatileEnlistment then its directories are symbolicaly linked and an excludes file is added to .git\info for those directories.

PARAMETERS

TfsUrl

The TFS Collection URL to use for connecting to TFS

Branch

The TFS Serverpath to be cloned

LocalSourcePath

Local path where the git repository will reside

RemoteOrigin (optional)

Path where a bare repository will be cloned to and added as the origin Remote. If a http or git:// based URI is enterd, the repo will not be cloned, instead the uri will simply be added as the remote origin.

EXAMPLE

Add-PartialBranchGitClone -tfsUrl http://myserver:8080/tfs -branch $/my/branch -localSourcePath "c:\dev\src\" -RemoteOrigin \\server\share\repo
This will create a git repository of $my/branch located at c:\dev\src and the repo will be cloned to \\server\share\repo. All git pushes and pulls will be directed tothat remote location.

Last edited Jan 14, 2013 at 5:32 AM by mwrock, version 2

Comments

No comments yet.