5

I went into the Admin tab for a repository and found how to delete an entire repository, but I cannot remove single files and folders.

  • I am awesome! Of course, there is the fact that you can't, because it is a version control site, not a file sync site. Odd that you can edit the files though. – The Great Widi Jan 15 '14 at 21:50
6

It's not really possible by design. You have to do it locally and then push the new changes. Online you can only view the repositories.

  • Is there a reason they don't allow this? – David Faux Mar 23 '12 at 2:57
  • 2
    Yes.. there many reasons... it is not Dropbox and their target is mainly the programmers. Because it's a version control system and for every little change you need to log it.. something that is done in batches.. There are different ways to delete a single file and then if they are going to implement them all.. people would start wondering.. why not having a copy/move/etc... – Lipis Mar 23 '12 at 9:30
  • Funny how you can do it on GitHub. – JohnK Aug 12 '13 at 15:25
3

You can now, go to the BitBucket repository and do the following:

  • Optionally press f to search for the file to delete
  • With the file open, on the right-hand side of the screen you'll see a small down arrow (next to the edit button), click it and select Delete
  • BitBucket will ask for an optional commit message, then click Commit
  • All done

The downside is that only one file can be deleted per commit.

1

You may be able get there part way if the files were added as part of single changeset. The admin interface lets you strip individual changesets, which would undo this. There are a bunch of caveats:

Stripping is a convenient way to remove changesets, but it manipulates history. If one strips a changeset that others have already pulled, it's likely to be pushed to the repository again unless every other contributor performs the strip locally.

1

You can do this.

I went to the remote repository's website > Source > select branch > select folder > select file to be deleted > Edit > Delete > Commit.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.