6

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

1
  • 2
    You cannot push a commit that deletes it? Commented Nov 10, 2014 at 6:44

1 Answer 1

47

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

Sign up to request clarification or add additional context in comments.

6 Comments

The problem is I have deleted the folder on my local drive which is at another location but the folder is still in my online repo, so I want to delete the folder 'Serverside Project' from my online repo then pull all the other folders and files that are on my online repo atm.
Oh I see, then why don't you clone the repo delete the folder then push?
@MauricioTrajano you can do it faster using git rm -r folder
I tried doing that and this is what I got: $ git rm -r Serverside Project fatal: pathspec 'Serverside' did not match any files
Spaces are treated as separate arguments do git rm -r Serverside\ Project
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.