Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to delete one folder from git repo? [duplicate]

Tags:

git

bitbucket

I have a folder called "Serverside Project" that I want to delete from my git repo online. I can't seem to be able to get rid of it! How do I remove it?

enter image description here

like image 674
ifusion Avatar asked Nov 10 '14 06:11

ifusion


People also ask

Can we delete a folder directly on GitHub?

You can delete an individual file or an entire directory in your repository on GitHub. People with write permissions can delete files or directories in a repository.

How do I remove a directory in git bash?

Delete a Directory ( rm -r ) To delete (i.e. remove) a directory and all the sub-directories and files that it contains, navigate to its parent directory, and then use the command rm -r followed by the name of the directory you want to delete (e.g. rm -r directory-name ).


1 Answers

You can just delete the folder locally and then push, ex:
rm -rf folder
git add .
git commit -a -m "removed folder"
git push origin master

like image 119
Mauricio Trajano Avatar answered Sep 21 '22 17:09

Mauricio Trajano