CodeCommit / Client / create_branch

create_branch#

CodeCommit.Client.create_branch(**kwargs)#

Creates a branch in a repository and points the branch to a commit.

Note

Calling the create branch operation does not set a repository’s default branch. To do this, call the update default branch operation.

See also: AWS API Documentation

Request Syntax

response = client.create_branch(
    repositoryName='string',
    branchName='string',
    commitId='string'
)
Parameters:
  • repositoryName (string) –

    [REQUIRED]

    The name of the repository in which you want to create the new branch.

  • branchName (string) –

    [REQUIRED]

    The name of the new branch to create.

  • commitId (string) –

    [REQUIRED]

    The ID of the commit to point the new branch to.

Returns:

None

Exceptions