I have two git repos like below in Atlassian Stash / Bitbucket Enterprise. Repo2 is forked from repo1, but has no change yet.
I would like to change repo2 to be master repo and repo1 to be fork of repo2. . How can I reverse the relation?
I have two git repos like below in Atlassian Stash / Bitbucket Enterprise. Repo2 is forked from repo1, but has no change yet.
I would like to change repo2 to be master repo and repo1 to be fork of repo2. . How can I reverse the relation?
You could just swap the origins.
$ cd repo1
$ git remote rm origin
$ git remote add origin git@url.ext:org/Repo2.git
then
$ cd repo2
$ git remote rm origin
$ git remote add origin git@url.ext:org/Repo1.git
Alternatively, add seperate origins.
$ cd repo1
$ git remote add actual git@url.ext:org/Repo2.git
$ git fetch actual
$ cd repo2
$ git remote add actual git@url.ext:org/Repo1.git
$ git fetch actual