'How to delete a folder from Bitbucket repository?

I'm a Bitbucket noob and having a hard time getting started.

I'm trying to clean up the Bitbucket repository and my local git folder master and branch organisation.

My local computer's git folder has some folders deleted via Terminal $ rm -r folderName > $ git push.

Bitbucket repository still shows the folderName. How do I remove this?

I already deleted file and commited , but files cached on bitbucket.



Solution 1:[1]

You need to remove the folder from your local repository with git rm -r folderName and then git commit -m 'Delete folder folderName because foo (for example) and git push.

Solution 2:[2]

You need to commit your changes before pushing them.

Solution 3:[3]

you forgot:

git commit -am "commit message"

Solution 4:[4]

You probably didn't do a final "git push" Once you delete your folder locally,

  1. git status
    this shows you that a folder was deleted
  2. git add .
    this stages changes
  3. git commit "deleted xyz folder"
  4. git push

this final "git push" deletes the folder on remote

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Adam Taylor
Solution 2 wRAR
Solution 3 al_kash
Solution 4 kmxr