Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove a folder from remote repository

I have a github repository which has a folder that i didnt mean to commit. I removed that folder from my local git repo, but when i push my local repo, all new changes are pushed, but the folder is still in my remote repository. how can i delete this folder from GITHUB?

like image 933
Ebenezer Mathebula Avatar asked Oct 24 '25 00:10

Ebenezer Mathebula


1 Answers

As commenters suggested, you can delete the folder as part of a commit using git rm.

Specifically,

git checkout <branch name>
git pull
git rm -rf <folder name>
git commit -m "<commit message>"
git push origin <branch name>
like image 135
yes-siz Avatar answered Oct 26 '25 15:10

yes-siz