Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Delete a script (source) from a branch in BitBucket

Francesco Ciriachi
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 16, 2019

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

Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 20, 2019

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
AUG Leaders

Atlassian Community Events