Sucheta Shrivastava
Sucheta Shrivastava

Reputation: 293

How to delete a particular folder from github account

I wish to delete a particular folder from my github repository.

Here is the image -

enter image description here

 git init

 git remote add origin '...'

 git rm -r --cached 'folder_name'


 error - fatal: pathspec 'COMGO/Bkp' did not match any files

Upvotes: 1

Views: 62

Answers (1)

O.Man
O.Man

Reputation: 639

Web Interface

You can delete a file using delete button but you cannot directly delete a folder via the web-interface. The way to delete a folder from GitHub.com is to delete every file inside it.

Terminal

Steps to remove directory

git rm -r --cached FolderName
git commit -m "Removed folder from repository"
git push origin master

Upvotes: 1

Related Questions