Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Ground Controller Lvl 1
Message 11 of 23

Re: How to delete multiples files in Github

It actually deleted the read.md file too

Highlighted
Ground Controller Lvl 2
Message 12 of 23

Re: How to delete multiples files in Github

Its deleting folder i want to delete inside folder file's

Highlighted
Ground Controller Lvl 2
Message 13 of 23

Re: How to delete multiples files in Github

Thanks. It works.

Highlighted
Ground Controller Lvl 1
Message 14 of 23

Re: How to delete multiples files in Github

thanks. But can you add these feautere to web UI? because this id going to be a simple way.

Highlighted
Ground Controller Lvl 2
Message 15 of 23

Re: How to delete multiples files in Github

I get "fatal: pathspec ... did not mach any files", though files are added to GitHub when I add another directory.

I was studying to work ith git with GitBush, GitGUI, Intellij IDEA, TortoiseGit and, think, made some modifications, which I cannot get rid of now.
Any commit adds too many extra folders, which I can't delete from git with your instructions.

Highlighted
Ground Controller Lvl 1
Message 16 of 23

Re: 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:
deleted: arrange_control.py
deleted: java_properties.py

...

After using git add -u :/

git status shows:

Changes to be committed:
(use "git reset HEAD <file>..." to unstage)

deleted: arrange_control.py
deleted: java_properties.py

...

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 arrange_control.py
delete mode 100644 java_properties.py
delete mode 100644 logging_absolute_minimum.py

...

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!


...

 

Highlighted
Ground Controller Lvl 2
Message 17 of 23

Re: How to delete multiples files in Github

Delete for moment multiple files in website
Highlighted
Ground Controller Lvl 1
Message 18 of 23

Re: How to delete multiples files in Github

        remove files in local

  • git rm <file1> <file2> <file3>........

       commit your chnages

  • git commit -m "removing files"

       push your chnages to github

  • git push

   you can refere here how to remove files from git-git remove untracked files

Highlighted
Ground Controller Lvl 1
Message 19 of 23

Re: How to delete multiples files in Github

how do i open the command line?

 

 

Ground Controller Lvl 1
Message 20 of 23

Re: How to delete multiples files in Github

One easy way: download and install git from "https://git-scm.com/download/win". In windows explorer, go to the folder you want, right-click and run "Git bash here".