Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove deleted folder from remote repository in Git?

Tags:

git

i deleted a folder from my local Git repository then i committed and pushed the changes to the remote repository, the files are deleted but the folder and the sub folder are still there. How could i remove the empty folder from the remote repository?

like image 819
Jimmy Avatar asked Nov 01 '10 23:11

Jimmy


1 Answers

You can force git to quit tracking a local file by calling:

git rm file.txt #warning, this also deletes the file from your filesystem

You can delete an entire directory (and it's contents) by calling:

git rm -rf directory

like image 108
brycemcd Avatar answered Oct 22 '22 17:10

brycemcd