About deleting files and
directories
You can delete an individual file from the repository or from an
entire directory, including all files in the directory
.
If you try to delete a file or directory in a repository for which you do not have write permissions, we will fork the project into your personal account and help you submit a pull request to the original repository after committing the change. For more information, see “About Pull Requests.”
If the file or directory you deleted contains sensitive data, the data is still available in the repository’s Git history. To completely delete the file from GitHub, you must delete the history file from your repository. For more information, see “Deleting sensitive data from a repository.”
Delete
a file Browse
-
to the repository file that you want to delete
-
the top of the file, click
-
Click Confirm changes…
-
Confirmation message” field, type a short, meaningful confirmation message that describes the change made to the file. You can attribute the commit to more than one author in the confirmation message. For more information, see “Create a multi-author commit.”
-
associated with your account in GitHub.com, click the Email Address drop-down menu and select the email address you want to use as the Git author email address. Only verified email addresses appear in this drop-down menu. If you enabled email address privacy, <username>@users.noreply.github.com is the confirmation author’s default email address. For more information, see “Setting up your confirmation email address.”
-
Under the fields in the confirmation message, decide whether you want to add your confirmation to the current branch or to a new branch. If your current branch is the default branch, you must choose to create a new branch for confirmation, and then create a pull request. For more information, see “Creating a Pull Request.”
-
Click Propose File Change.
. At
.
In the “
If you have more than one email address
Delete a
directory Browse to
-
the repository directory that you want to delete
-
In the upper-right corner, select the drop-down menu, then click Delete directory
.
-
Review the files that you will delete.
-
Click Confirm changes…
-
Confirmation message” field, type a short, meaningful confirmation message that describes the change made to the file. You can attribute the commit to more than one author in the confirmation message. For more information, see “Create a multi-author commit.”
-
associated with your account in GitHub.com, click the Email Address drop-down menu and select the email address you want to use as the Git author email address. Only verified email addresses appear in this drop-down menu. If you enabled email address privacy, <username>@users.noreply.github.com is the confirmation author’s default email address. For more information, see “Setting up your confirmation email address.”
-
Under the fields in the confirmation message, decide whether you want to add your confirmation to the current branch or to a new branch. If your current branch is the default branch, you must choose to create a new branch for confirmation, and then create a pull request. For more information, see “Creating a Pull Request.”
-
Click Propose File Change.
.
In the “
If you have more than one email address