Appends a commit to the given branch as the authenticated user.
This mutation creates a commit whose parent is the HEAD of the provided
branch and also updates that branch to point to the new commit.
It can be thought of as similar to git commit
.
Locating a Branch
Commits are appended to a branch
of type Ref
.
This must refer to a git branch (i.e. the fully qualified path must
begin with refs/heads/
, although including this prefix is optional.
Callers may specify the branch
to commit to either by its global node
ID or by passing both of repositoryNameWithOwner
and refName
. For
more details see the documentation for CommittableBranch
.
Describing Changes
fileChanges
are specified as a FilesChanges
object describingFileAdditions
and FileDeletions
.
Please see the documentation for FileChanges
for more information on
how to use this argument to describe any set of file changes.
Authorship
Similar to the web commit interface, this mutation does not support
specifying the author or committer of the commit and will not add
support for this in the future.
A commit created by a successful execution of this mutation will be
authored by the owner of the credential which authenticates the API
request. The committer will be identical to that of commits authored
using the web interface.
If you need full control over author and committer information, please
use the Git Database REST API instead.
Commit Signing
Commits made using this mutation are automatically signed by GitHub if
supported and will be marked as verified in the user interface.
Arguments
Parameters for CreateCommitOnBranch