Skip to content
Back to template gallery
GitHub
GitHub

How to Delete a File from GitHub

Adding a file to GitHub is simple enough, but how do you delete a file from GitHub? Let's go over it in a few quick steps.

IT & Engineering
6 steps 2 min Community template
1

Click the repository header area

Click the repository header area located below the main navigation tabs.

github.com
Click the repository header area
2

Click the newfilename link

Click the "newfilename" link in the repository file list to view its contents.

github.com
Click the newfilename link
3

Click the More file actions button

Click the "More file actions" button in the top right corner of the file header to open the dropdown menu.

github.com
Click the More file actions button
4

You'll see a Trash icon. Click this to delete the file.

Click the "Delete file" option at the bottom of the dropdown menu to remove the file from the repository.

github.com
You'll see a Trash icon. Click this to delete the file.
5

You'll have to commit the changes, so make sure to add a commit message.

Click the green "Commit changes..." button in the top right corner to proceed with deleting the file.

github.com
You'll have to commit the changes, so make sure to add a commit message.
6

Add a description if you want, and click Commit changes when you are done.

Click the "Commit changes" button at the bottom right of the modal to finalize the deletion.

github.com
Add a description if you want, and click Commit changes when you are done.

Make this walkthrough your own

Duplicate this template, swap in your own screens, and share it with your team. Free to start — no credit card.