Good day!
I just wanted to ask how to delete directly a folder file in bitbucket instead of deleting it locally and commit push?
Since I'm encountering an issue during push I can't update the deleted file in my project, so I'm planning to delete the folder directly in the bitbucket. Do you have any ideas?
Hi @Nica and welcome to the community!
It is not possible to delete a folder directly in Bitbucket. The deletion needs to be done locally and then it needs to be committed and pushed.
Please keep in mind that this won't delete the folder or file from the previous commits. Deleting a folder or file from history would require rewriting history, e.g. with a tool like BFG repo cleaner. However, if you are not looking to remove it from history, then committing the deletion should be ok.
What issues are you facing when you try to push? What is the output of the push command? Perhaps we can help with that.
We also offer an API endpoint to create a commit that deletes files:
You can see an example below the line that reads "To create a commit that deletes files, use the files parameter:"
Kind regards,
Theodora
It doesn't matter where it is done, deleting a folder must be done with an actual commit!
But I think you're approaching it in the wrong way. Instead of trying to delete that folder for whatever reason, why don't you "git pull"? It would "sync" your local repo to the remote one,. It could even result in conflicts that you have to resolve, but it is the way to do it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.