I'm trying to remove a folder from Bitbucket.
I tried the following commands, but they aren't working:
$ rm -r folderName
$ git push
I'm trying to remove a folder from Bitbucket.
I tried the following commands, but they aren't working:
$ rm -r folderName
$ git push
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
.
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.