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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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,413,029
Community Members
 
Community Events
170
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