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

How to delete new ref pushed accidentally to bitbucket

Deleted user January 29, 2018

I am an admin and got notified that someone pushed a new branch called 'refs/remotes/upstream/release/5.2.2'

err1a.png
But when I went to look at the branches, it didn't show it in existence, and it is different from the release/5.2.2 branch that already exists

err1b.png

err2a.png

It is also listed as refs/remotes/upstream/release/5.2.2 in the URL

err3a.png

How do I delete it if I can't find it?

1 answer

0 votes
Dave Chevell
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 13, 2018

Hi Kat,

 

It looks as though someone has actually created a branch called refs/remotes/upstream/release/5.2.2 , which may be due to them mishandling multiple remotes on the client side, or some other kind of user error.

You can delete a remote branch (that is, a branch on the server side) from your local copy of the affected git repository, by running this command from your terminal:

git push origin :refs/remotes/upstream/release/5.2.2

The colon character ":" in front of the branch name is a git shorthand for pushing a delete command to the server for this particular branch.

 

Cheers,

Dave Chevell 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events