ugit.types.ps1xml

<?xml version="1.0" encoding="utf-16"?>
<!-- Generated with EZOut 1.8.4: Install-Module EZOut or https://github.com/StartAutomating/EZOut -->
<Types>
  <Type>
    <Name>git.branch</Name>
    <Members>
      <ScriptMethod>
        <Name>Delete</Name>
        <Script>
                        Push-Location $this.GitRoot
git branch '-d' $this.BranchName @args
Pop-Location
                    </Script>
      </ScriptMethod>
      <ScriptMethod>
        <Name>ToString</Name>
        <Script>
                        $this.BranchName

                    </Script>
      </ScriptMethod>
    </Members>
  </Type>
  <Type>
    <Name>git.branch.detail</Name>
    <Members>
      <ScriptMethod>
        <Name>Delete</Name>
        <Script>
                        Push-Location $this.GitRoot
git branch '-d' $this.BranchName @args
Pop-Location
                    </Script>
      </ScriptMethod>
      <ScriptMethod>
        <Name>ToString</Name>
        <Script>
                        $this.BranchName

                    </Script>
      </ScriptMethod>
    </Members>
  </Type>
  <Type>
    <Name>git.commit.info</Name>
    <Members>
      <ScriptMethod>
        <Name>Amend</Name>
        <Script>
                        param(
[Parameter(Mandatory)]
[string]
$Message
)

Push-Location $this.GitRoot
git commit --ammend -m $Message @args
Pop-Location

                    </Script>
      </ScriptMethod>
      <ScriptMethod>
        <Name>UpdateMessage</Name>
        <Script>
                        param(
[Parameter(Mandatory)]
[string]
$Message
)

Push-Location $this.GitRoot
git commit --ammend -m $Message @args
Pop-Location


                    </Script>
      </ScriptMethod>
    </Members>
  </Type>
  <Type>
    <Name>git.log</Name>
    <Members>
      <ScriptMethod>
        <Name>Archive</Name>
        <Script>
                        param(
[Parameter(Mandatory)]
[string]
$ArchivePath
)
$unresolvedArchivePath = $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($ArchivePath)

Push-Location $this.GitRoot
git archive $this.CommitHash '-o' "$unresolvedArchivePath" @args
Pop-Location

                    </Script>
      </ScriptMethod>
      <ScriptMethod>
        <Name>Checkout</Name>
        <Script>
                        Push-Location $this.GitRoot
git checkout $this.CommitHash @args
Pop-Location
                    </Script>
      </ScriptMethod>
      <ScriptMethod>
        <Name>Diff</Name>
        <Script>
                        Push-Location $this.GitRoot
git diff $this.CommitHash @args
Pop-Location
                    </Script>
      </ScriptMethod>
      <ScriptMethod>
        <Name>Reset</Name>
        <Script>
                        Push-Location $this.GitRoot
git reset $this.CommitHash @args
Pop-Location
                    </Script>
      </ScriptMethod>
      <ScriptMethod>
        <Name>Revert</Name>
        <Script>
                        Push-Location $this.GitRoot
git revert $this.CommitHash @args
Pop-Location
                    </Script>
      </ScriptMethod>
      <ScriptProperty>
        <Name>ReferenceNumbers</Name>
        <GetScriptBlock>
                        [Regex]::new("#(?&lt;n&gt;\d+)").Matches($this.CommitMessage) -replace '#' -as [int[]]
                    </GetScriptBlock>
      </ScriptProperty>
    </Members>
  </Type>
  <Type>
    <Name>git.status</Name>
    <Members>
      <ScriptMethod>
        <Name>Push</Name>
        <Script>
                        Push-Location $this.GitRoot
if (-not $this.Status) {
    git push --set-upstream origin $this.BranchName @args
} else {
    git push @args
}
Pop-Location

                    </Script>
      </ScriptMethod>
    </Members>
  </Type>
</Types>