Test-GitRemoteUri

Tests if the uri leads to a git repository

Syntax

Test-GitRemoteUri [-Uri] <String> [<CommonParameters>]

Description

The Test-GitRemoteUri tries to list remote references for the specified uri. A uri that is not a git repo will throw a LibGit2SharpException.

This function is similar to git ls-remote but returns a bool based on if there is any output

Parameters

Name Type Description Required? Pipeline Input Default Value
Uri String

The uri to test

true false

EXAMPLE 1

Test-GitRemoteUri -Uri 'ssh://git@stash.portal.webmd.com:7999/whs/blah.git'

Demonstrates how to check if there is a repo at the specified uri