HEX
Server: LiteSpeed
System: Linux ip-172-31-76-142.ec2.internal 4.14.158-129.185.amzn2.x86_64 #1 SMP Tue Dec 24 03:15:32 UTC 2019 x86_64
User: 69b4844ae61d4e92bf26ad98af552775 (1065)
PHP: 7.2.27
Disabled: exec,passthru,shell_exec,system,eval
Upload Files
File: //lib/python2.7/site-packages/awscli/examples/codecommit/delete-file.rst
**To delete a file**

The following ``delete-file`` example demonstrates how to delete a file named ``README.md`` from a branch named ``master`` with a most recent commit ID of ``c5709475EXAMPLE`` in a repository named ``MyDemoRepo``. ::

    aws codecommit delete-file --repository-name MyDemoRepo --branch-name master --file-path README.md --parent-commit-id c5709475EXAMPLE

Output::

    {
        "blobId":"559b44fEXAMPLE",
        "commitId":"353cf655EXAMPLE",
        "filePath":"README.md",
        "treeId":"6bc824cEXAMPLE"
    }

For more information, see `Edit or Delete a File in AWS CodeCommit`_ in the *AWS CodeCommit API Reference* guide.

.. _`Edit or Delete a File in AWS CodeCommit`: https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-edit-file.html?shortFooter=true#how-to-edit-file-cli