Test-GitIncomingCommit

Tests for incoming commits not in your local directory for a given repository.

Syntax

Test-GitIncomingCommit [[-RepoRoot] <String>] [-All] [<CommonParameters>]

Description

The Test-GitIncomingCommit function checks if there are commits in the remote repository that are not in the local repository.

If the -All switch is used, all branches are checked. Otherwise, just the current branch.

It defaults to the current repository. Use the RepoRoot parameter to specify an explicit path to another repo.

This function implements the git log branch..remotes/origin/branch command

Parameters

Name Type Description Required? Pipeline Input Default Value
RepoRoot String

The repository to test for incoming changes. Defaults to the current directory.

false false (Get-Location).ProviderPath
All SwitchParameter

Check for incoming commits on all branches. Otherwise, just current.

false false False

EXAMPLE 1

Test-GitIncomingChange -RepoRoot 'C:\Projects\LibGit2'

Demonstrates how to check for incoming changes for a repository that isn't the current directory.