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

Detach fork

frarugi87 April 26, 2016

Hello

Sorry if this is a kind of noobish question, but I couldn't find a solution to this.

I forked a repository from another account to my Bitbucket one. Now, I'd like to detach this fork. As for now in the repository overview I can read "Fork of: the original repository"; I'd like to remove this, but at the same time I'd like to preserve the commit history.

How can I do it?

I read from another answer that I should just remove the remote, but I couldn't find any remote variable in the configuration menu of the repository.. Where is that supposed to be?

Best regards

5 answers

5 votes
antonsson October 16, 2017
0 votes
daniel debela June 19, 2020

The only way this could be done is to do the following

# retire your current repo keep it as read-only for references purposes.

# Create a new empty repository

# Move over current active branches  

0 votes
aloraine November 16, 2019

Maybe this:

  • clone your downstream fork onto your local 
  • create a new empty repo on bitbucket 
  • rename "origin" on your local clone to your new empty repo
  • push your clone to the new origin
  • go to your new "origin" - check that all the commits and branches you expect to see are there
Alain Giller November 29, 2019

If you do this, you will lose all pull requests history

0 votes
evzijst
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 2, 2016

I'm afraid this is actually not possible. Short of deleting the original repository, the relationship cannot be broken. Note that this is not really out of any philosophical reason, but more something we have never gotten around to. If you feel strongly, please raise an issue at https://bitbucket.org/site/master

Jason Harrison April 29, 2022

Contact technical support and have them detach the source repo from the forked repo.

0 votes
GeoffB April 28, 2016

I can't find anyway to remove the "fork of" relationship either.  On GitHub this can only be done by a request to support, but is typically completed within a day or two.

If we're effectively taking ownership of a code base (where the original owner wants to keep their own record) are we best to simply clone and commit into a blank repo?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events