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

Can you delete a branch with uncommitted pull requests?

i have some old branches in my team's repository that i'm finally cleaning up, however, some of these branches and commits that haven't been merged into the master branch yet.  these are so old that i just want to delete them with no merge.  is this possible?

1 answer

1 accepted

0 votes
Answer accepted
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 02, 2023

Hello @Jean Hilaire ,

Welcome to Atlassian Community!

You can definitely delete branches in the UI by accessing the Branches option in the left panel, clicking on the three-dot icon (Action column) in the line of the branch you want to delete, and selecting Delete.

However, if the branch to be deleted is the source or destination branch of an Open pull request, the Delete option will be greyed-out and you will not be able to delete it while the Pull Request is still in the Open state.

The workaround in this case, as you don't want to merge those old Pull requests anymore, is to access the Pull Request page and filter for any PRs where the branch you want to delete is either the source or destination branch. Then you can open each of the PRs, click on the three-dot icon and select Decline. This will close the Pull request with the state Declined. Once all the open PRs of a given branch are declined, you should be able to delete that branch in the UI as usual.

Hope that helps! Let me know in case you have any questions.

Thank you, @Jean Hilaire 

Patrik S

Thank you!  The workaround has worked in some way.  We've had to create a new branch, committing the code and pushing this out to the new branch and then ultimately delete the old branch. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events