New GitHubRepository - X-Guardian/PowerShellForGitHub GitHub Wiki
Creates a new repository on GitHub.
New-GitHubRepository [-RepositoryName] <String> [[-OrganizationName] <String>] [[-Description] <String>]
[[-Homepage] <String>] [[-GitIgnoreTemplate] <String>] [[-LicenseTemplate] <String>] [[-TeamId] <Int64>]
[-Private] [-NoIssues] [-NoProjects] [-NoWiki] [-AutoInit] [-DisallowSquashMerge] [-DisallowMergeCommit]
[-DisallowRebaseMerge] [-DeleteBranchOnMerge] [-IsTemplate] [[-AccessToken] <String>] [-NoStatus] [-WhatIf]
[-Confirm] [<CommonParameters>]
Creates a new repository on GitHub.
The Git repo for this module can be found here: http://aka.ms/PowerShellForGitHub
New-GitHubRepository -RepositoryName MyNewRepo -AutoInit
'MyNewRepo' | New-GitHubRepository -AutoInit
New-GitHubRepository -RepositoryName MyNewRepo -Organization MyOrg -DisallowRebaseMerge
If provided, this will be used as the AccessToken for authentication with the REST Api. Otherwise, will attempt to use the configured value or will run unauthenticated.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: 8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specify this to create an initial commit with an empty README.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Specifies the automatic deleting of head branches when pull requests are merged.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
A short description of the repository.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
By default, merging pull requests with a merge commit will be allowed. Specify this to disallow.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
By default, rebase-merge pull requests will be allowed. Specify this to disallow.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
By default, squash-merging pull requests will be allowed. Specify this to disallow.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Desired language or platform .gitignore template to apply. For supported values, call Get-GitHubGitIgnore. Values are case-sensitive.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
A URL with more information about the repository.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies whether the repository is made available as a template.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Choose an open source license template that best suits your needs. For supported values, call Get-GitHubLicense Values are case-sensitive.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
By default, this repository will support Issues. Specify this to disable Issues.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
By default, this repository will support Projects. Specify this to disable Projects. If you're creating a repository in an organization that has disabled repository projects, this will be true by default.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
If this switch is specified, long-running commands will run on the main thread with no commandline status update. When not specified, those commands run in the background, enabling the command prompt to provide status information. If not supplied here, the DefaultNoStatus configuration property value will be used.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
By default, this repository will have a Wiki. Specify this to disable the Wiki.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Name of the organization that the repository should be created under. If not specified, will be created under the current user's account.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
By default, this repository will be created Public. Specify this to create a private repository.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Name of the repository to be created.
Type: System.String
Parameter Sets: (All)
Aliases: Name
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.
Type: System.Int64
Parameter Sets: (All)
Aliases:
Required: False
Position: 7
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.