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

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


1 badge earned


Participate in fun challenges

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


Gift kudos to your peers

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


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!


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
Community Members
Community Events
Community Groups

Restore a deleted branch from pull request


We have accidentally deleted a remote branch but we have a pull request of this deleted branch and the parent branch is also deleted. Can we restore this branch somehow?




1 comment

Julius Davies _bit-booster_com_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Aug 27, 2018 • edited


Suggestion #1:  if you know the commit-id for the branch you want to restore, this usually works (from a reasonably up-to-date clone):

git push origin [commit-id]:refs/heads/[name-of-branch]


Suggestion #2:  if "[commit-id]" is not present in the clone, then things get a little trickier, since you'll need to mess around in Bitbucket's back-end area ($BITBUCKET_HOME/shared/data/repositories), and you can potentially break things catastrophically if you're messing around in there.

Note:  I assume you're on Bitbucket Server.   If you're on Bitbucket Cloud, then suggestion #1 still works, but you'll need to open a support ticket with Atlassian to attempt anything similar to suggestion #2.


Log in or Sign up to comment
AUG Leaders

Atlassian Community Events