v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1477523442.5 KB

Creates a commit for a repository on the tip of a specified branch.

post/#X-Amz-Target=CodeCommit_20150413.CreateCommit

Headers

X-Amz-Target'CodeCommit_20150413.CreateCommit' required

Request body

repositoryNamestring required

The name of the repository where you create the commit.

branchNamestring required

The name of the branch where you create the commit.

parentCommitIdstring

The ID of the commit that is the parent of the commit you create. Not required if this is an empty repository.

authorNamestring

The name of the author who created the commit. This information is used as both the author and committer for the commit.

emailstring

The email address of the person who created the commit.

commitMessagestring

The commit message you want to include in the commit. Commit messages are limited to 256 KB. If no message is specified, a default message is used.

keepEmptyFoldersboolean

If the commit contains deletions, whether to keep a folder or folder structure if the changes leave the folders empty. If true, a ..gitkeep file is created for empty folders. The default is false.

Response

Success

commitIdstring

The full commit ID of the commit that contains your committed file changes.

treeIdstring

The full SHA-1 pointer of the tree information for the commit that contains the commited file changes.