How to delete multiples files in Github

I was helped by your answer.  However, my task, in  removing a large number of files needed an additional step.  I used Windows explorer to remove a checked list of files from the appropriate directory. Upon trying a commit, I got the following:

C:\Users\raysm\Documents\GitHub\resource_lib [master ≡ +0 ~0 -86 !]> git commit -m “Removed misplaced files”
On branch master
Your branch is up-to-date with ‘origin/master’.

Changes not staged for commit:

After using  git add -u :confused:

git status shows:

Changes to be committed:
(use “git reset HEAD <file>…” to unstage)


The the commit worked for me as follows:

git commit -m “Removed misplaced files”
[master b1cda43] Removed misplaced files
85 files changed, 24220 deletions(-)
delete mode 100644
delete mode 100644
delete mode 100644

git push origin master
Counting objects: 6, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 621 bytes | 621.00 KiB/s, done.
Total 6 (delta 4), reused 0 (delta 0)
remote: Resolving deltas: 100% (4/4), completed with 2 local objects.

Thanks for the help.


There isn’t a way to select multiple files for deletion using the Web UI at the moment, but I’ll let the team know you’d like us to add this feature in the future.

In the meantime, the way we 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!

Delete for moment multiple files in website

Delete for movement something reason

Wonderful Solution.

You are amazing!

they wont give you a reply, because they dont know

@chuankin wrote:

How do I delete multiple files using github desktop?

I was wondering if there’s a solution development in the meantime.

I just had an issue with a repo which I couldn’t clone locally because of a type of file preventing it and there were multiple files of that type scattered accross the repo.

So I had to delete those files first before being able to continu.  The repo wasn’t really big but manually having to delete every individual file was cumbersome.

It would’ve been nice if I could have just used find file to find the files, select them all and then delete.

1 Like

git rm -r *

This command will delete everything in the local git, then follow the other commands:

> git commit -m "Remove duplicated directory"
> * `git push origin master`

Is your question related to how I can delete files in repository? You can delete all files from the repository. Just follow the GitHub official guidelines here: