Copy-Gist


Synopsis

Copy a Gist Object.


Syntax

Copy-Gist [-Id] <string[]>  [<CommonParameters>]

Aliases

Fork-Gist


Description

Copy (Fork) a Gist Object to the current authenticated user context.


Parameters

-Id <string[]>
    The Id of the Gist Object.
    
    Required?                    true
    Position?                    Named
    Accept pipeline input?       true (ByValue, ByPropertyName)
    Parameter set name           (All)
    Aliases                      None
    Dynamic?                     false
    
<CommonParameters>
    This cmdlet supports the common parameters: Verbose, Debug,
    ErrorAction, ErrorVariable, WarningAction, WarningVariable,
    OutBuffer, PipelineVariable, and OutVariable. For more information, see 
    about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

Inputs

System.String[]

  • Represents text as a sequence of UTF-16 code units.

Outputs

Gist

  • A custom .net object representation of the JSON response from the GitHub API.

Notes

There must be an Authenticated User Context to interact with Gist Objects.


Example 1

Copy (Fork) the Gist ‘93258652fee1551dd0c63fbd5a37c8e0’ to the user named ‘dotps1’ Gists.

PS C:\> Copy-GistFile -Id 93258652fee1551dd0c63fbd5a37c8e0


Owner       : dotps1
Description : Read me file for PSGist.
Id          : 50m3rand0m1dthatg3t5cr3at3d
CreatedAt   : 1/1/2016 00:00:00 AM
UpdatedAt   : 1/1/2016 00:00:00 AM
Public      : True
HtmlUrl     : https://gist.github.com/50m3rand0m1dthatg3t5cr3at3d
Files       : README.md
Fork me on GitHub