The title pretty much is the question. I am aware of git rm file
but this isn't what I am looking for. I am looking for a way to delete files and folders in a github repo using ONLY a browser.

- 5,356
- 10
- 41
- 67
-
This would require that github could create commits to your tree -- if you delete a file, the file tree changes, therefore a new commit has to be created for that new file tree. I am not sure github wants to take responsibility for that... – fge Jan 09 '13 at 14:43
-
2Github already does that for new files, edited files.. – Arnab Datta Jan 09 '13 at 14:46
4 Answers
This is not (yet?) available through the web interface.
As GitHub added File editing, then File creation features, this may make sense to propose such a feature. The recommended channel to do so is to send an email to support@github.com.
Update
Deletion of files through the web interface is now available.

- 64,429
- 20
- 138
- 130
-
Thanks, added a feature request through the mail address and looks like they are going to do it soon (tm) :) – Arnab Datta Jan 10 '13 at 18:19
-
2This is not yet available for all file types, although @nulltoken 's answer works great for text-based files. For example, PNGs only show a "Raw" and "History" button. You can't delete them online. I expect this to be true for all image files, perhaps all binary files. – JoeAndrieu Oct 26 '15 at 05:35
-
Note: you can also [delete *folders* directly on GitHub](https://stackoverflow.com/a/65673327/6309) now. – VonC Jan 11 '21 at 19:29
-
Note: You have to click the "commit changes" button for it to actually delete. – SurpriseDog May 04 '21 at 02:42
Delete all files within a folder. Folders are deleted automatically if there is no file in it anymore.

- 394
- 2
- 5
-
7Quite true...github horror vacui. The reason why this works is because github does not create (or delete) "directories" (they don't exist !), it works on the concept of files, and paths to files. You cannot have an empty "directory" because all nodes end in a file. – Jon Goodwin Oct 04 '17 at 18:38
-
1
You can't delete folders with a browser, but you can with the desktop app. Clone the repo to a directory, delete the folder there, and commit the change with the app.

- 8,218
- 8
- 36
- 58

- 313
- 3
- 12
There isn't a way to select multiple files for deletion using the Web UI at the moment.
In the meantime, the way GitHub recommend editing or deleting multiple files is by working with a local repository. You would then be able to delete the files in your local clone, commit that change to your local repository, and then push that change to the remote repository on GitHub.
The steps for doing this are:
In the command-line, navigate to your local repository.
Ensure you are in the default branch:
git checkout master
The
rm -r
command will recursively remove your folder:git rm -r folder-name
Commit the change:
git commit -m "Remove duplicated directory"
Push the change to your remote repository:
git push origin master
I hope this helps!

- 1
- 1

- 29
- 2