Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,362,282
Community Members
 
Community Events
168
Community Groups

Delete a script (source) from a branch in BitBucket

Good morning and happy Friday everyone. I've a question about BitBucket. I'm trying to delete a source from a shared branch, however after a few attempts and google searches, I couldn't find a solution for what I thought was relatively straightforward (could be I'm missing something very obvious like a drop down button or similar). Is anyone able to help? Thanks in advance

1 comment

Hello @Francesco Ciriachi,

What do you exactly mean by delete a source from a shared branch?

If this means deleting one (or few) file from that branch, you can do that in UI, single file at a time (make sure you selected the right branch in the dropdown at the top):

 mvnvm.properties — Bitbucket 2019-08-21 09-39-21.png

Note that every time you delete a file this way, a commit will be created on the branch in questions, that said the file you deleted will remain in the history of that branch.

If you need to remove more than one file, you might want to consider doing it in a single commit in your local copy of the repository, then pushing that commit to Bitbucket.

If you need to remove the file completely, i.e. not leave it in the history of your repository, you'll have to use history rewrite (assuming your repository is a Git one). This can only be done in your local copy of the repository, there're no tools for this in Bitbucket UI.

Hope this helps. Let me know if you have any questions.

Cheers,
Daniil

Comment

Log in or Sign up to comment
TAGS

Atlassian Community Events