0

I'm trying to remove a folder from Bitbucket.

I tried the following commands, but they aren't working:

$ rm -r folderName 
$ git push 
Andrej Kesely
  • 168,389
  • 15
  • 48
  • 91
Nagasree
  • 1
  • 1
  • 3
  • 3
    I think you're trying to just delete a folder from a remote Git repo, if that's the case, following the instructions in response to this post: https://stackoverflow.com/questions/6313126/how-to-remove-a-directory-from-git-repository – Benjamin Rowell Dec 20 '19 at 11:38

2 Answers2

1

Simply removing the folder from the local directory under version control won't do in this case.

Actually, what you need to do is to remove the folder from version control. Do git rm -r folderName.

Then you'll need to commit the change with a description. Do git commit -m "The reason for deleting the folder"

And finally, push the changes to the remote branch: git push.

Henry Harutyunyan
  • 2,355
  • 1
  • 16
  • 22
0

In your Bitbucket repository on the left, select Source. On the right, select My Folder. Select My File.txt to view the file. On the right, select the down arrow beside Edit and select Delete. Commit the change. In your Bitbucket repository on the left, select Source. Observe that an empty folder is automatically removed from a git repository.

umang naik
  • 141
  • 1
  • 10