How to remove a directory from github?

I have a folder in vendor/plugins/ which I deleted and passed as a delete in my github. But the folder still exists on github.

How to remove it from github? This may be a submodule. I'm not quite sure.

+6
source share
3 answers

You can try git rm -rf vendor/plugins to remove it recursively. You will need to do it again.

+5
source

Try it:

 git rm -r vendor/plugins git commit -m "Your comment here" git push -u origin master 

Deletes your directory first
The second one makes your commit
Third push your change

+9
source
 git rm -rf --cached $FILES 

e.g. git rm --cached -r .idea

I found this blog useful when I wanted to remove unnecessary hidden directories.

https://danielmiessler.com/blog/removing-files-from-a-git-repository-without-actually-deleting-them/

0
source

Source: https://habr.com/ru/post/893395/


All Articles