Delete a file
Deletes a file in a repository. You can provide an additional `committer` parameter, which is an object containing information about the committer. Or, you can provide an `author` parameter, which is an object containing information about the author. The `author` section is optional and is filled in with the `committer` information if omitted. If the `committer` information is omitted, the authenticated user's information is used. You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code.
/repos/{owner}/{repo}/contents/{path}- Source
github-v3-rest.json- Revision
f5f067c1e6f6- Active snapshot
85e53e3d0d65
Request
Path Parameters
- owner stringrequired
- repo stringrequired
- path stringrequired
path parameter
Body Params
required author objectoptionalobject containing information about the author.
object containing information about the author.
The email of the author (or committer) of the commit
The name of the author (or committer) of the commit
The branch name. Default: the repository’s default branch (usually `master`)
committer objectoptionalobject containing information about the committer.
object containing information about the committer.
The email of the author (or committer) of the commit
The name of the author (or committer) of the commit
The commit message.
The blob SHA of the file being replaced.
Responses
Response
commit objectrequired
author objectoptional
committer objectoptional
parents array[object]optional
items object
tree objectoptional
verification objectoptional
content objectrequirednullable
_links objectoptional
Resource not found
Conflict
Validation failed
errors array[object]optional
items object
Service unavailable