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,463,375
Community Members
 
Community Events
176
Community Groups

What are the difference between branch delete, close or archive

Hello,

I am quite new in git and I would like to ask for help in understanding the differences between deleting branch, closing it or moving to archive?

When I creating new pull request in Bitbucket cloud there is option to check "Delete My-Branch-Name after the pull request is merge".

But when I merging the same pull request in Bitbucket cloud then I have option to check "Close source branch".

Are those two options combine with each other, can I have here any conflicts here?

For example what will happen if I choose "Close source branch" when merging, but before (when I was creating pull request) I checked "Delete My-Branch-Name after the pull request is merge".

I am not even sure if those two actions are only Bitbucket's or at all Git's features?

 

But I've also heard about archiving branches on Git. And it seems to be for me the best option while I mainly want to archive branches instead deleting them. I would like to delete branch only manually. But not sure how to achieve that?

Or maybe "Close source branch" (when merging) is the same as archiving it? Or is it something else? 

 

For any help in understanding those issues great thanks in advance.

Best Regards

 

1 answer

The close and delete options should do the same thing. Once the pull request is merged into the destination branch it should delete(close) the source branch if any of the options are selected. 

 

Also if we do not choose to close/delete a branch then we can leave this option unchecked and bitbucket will not delete the branch once your pull request is merged. This means the branch would still be available in the repository and you can delete it manually when needed.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events