< Back
Get-GitChangedFile
Post
NAME Get-GitChangedFile
SYNOPSIS
Get a list of files changed in a git commit
SYNTAX
Get-GitChangedFile [[-Path] <Object>] [[-Commit] <Object>] [[-Include] <String[]>] [[-Exclude] <String[]>]
[-Resolve] [<CommonParameters>]
DESCRIPTION
Get a list of files changed in a git commit
PARAMETERS
-Path <Object>
Path to git repo. Defaults to the current working path
Required? false
Position? 1
Default value $PWD.Path
Accept pipeline input? false
Accept wildcard characters? false
-Commit <Object>
Commit hash
Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Include <String[]>
If specified, only return files that are '-like'
an item in the -Include
Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Exclude <String[]>
If specified, exclude any files that are '-like'
an item in the -Include
Required? false
Position? 4
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Resolve [<SwitchParameter>]
If specified, run Resolve-Path on the determined git path and file in question
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-GitChangedFile
# Get files changed in the most recent commit
# Use the current directory as the git repo path
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-GitChangedFile -Path \\\\Path\\To\\Git\\Repo
# Get files changed in the most recent commit
# Use \\\\Path\\To\\Git\\Repo as the git repo path
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Get-GitChangedFile -Commit 3d6b25ebbc6bbf961a4c1045548bc9ff90879bc6
# Get files changed in commit 3d6b25ebbc6bbf961a4c1045548bc9ff90879bc6,
# Use the current directory as the git repo path
RELATED LINKS
https://github.com/RamblingCookieMonster/BuildHelpers
about_BuildHelpers
SYNOPSIS
Get a list of files changed in a git commit
SYNTAX
Get-GitChangedFile [[-Path] <Object>] [[-Commit] <Object>] [[-Include] <String[]>] [[-Exclude] <String[]>]
[-Resolve] [<CommonParameters>]
DESCRIPTION
Get a list of files changed in a git commit
PARAMETERS
-Path <Object>
Path to git repo. Defaults to the current working path
Required? false
Position? 1
Default value $PWD.Path
Accept pipeline input? false
Accept wildcard characters? false
-Commit <Object>
Commit hash
Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Include <String[]>
If specified, only return files that are '-like'
an item in the -Include
Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Exclude <String[]>
If specified, exclude any files that are '-like'
an item in the -Include
Required? false
Position? 4
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Resolve [<SwitchParameter>]
If specified, run Resolve-Path on the determined git path and file in question
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-GitChangedFile
# Get files changed in the most recent commit
# Use the current directory as the git repo path
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-GitChangedFile -Path \\\\Path\\To\\Git\\Repo
# Get files changed in the most recent commit
# Use \\\\Path\\To\\Git\\Repo as the git repo path
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Get-GitChangedFile -Commit 3d6b25ebbc6bbf961a4c1045548bc9ff90879bc6
# Get files changed in commit 3d6b25ebbc6bbf961a4c1045548bc9ff90879bc6,
# Use the current directory as the git repo path
RELATED LINKS
https://github.com/RamblingCookieMonster/BuildHelpers
about_BuildHelpers