Delete folders on Github

Asked

Viewed 33,017 times

14

I committed my project on github and after a while, some folders wouldn’t need to be there anymore. I have knowledge that you can delete manually on github, but for that to happen, I need to delete file by file for the folder to disappear.

The situation is this: When I created my project, there were Landing and Email folders, but since I no longer need those folders, I created the img folder and unified the files within that folder. When I changed and moved up the project again, the img folder appeared correctly, but the Landing and Email folders weren’t gone, even though I used git rm and deleted them. By git status it appears that they have been deleted, but in my github repository they still appear.

There is another way to delete, not manually on github?

  • 1

    Did you see this topic? http://answall.com/questions/583/como-faço-para-remover-uma-pasta-do-historyco-do-git

1 answer

26


Well come on:

  1. First make sure your repository is synchronized with the remote repository: $ git pull origin master, (assuming the branch is master).
  2. Then remove the folder locally: $ git rm -r Landing Email.
  3. Now commit the modifications: $ git commit -m "Remove pastas Landing e Email"
  4. Sync with remote repository: $ git push origin master

After these changes the remote repository must be without the Landing and Email folders.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.