git - Bitbucket: fork to existing repository -
i have empty repository b on bitbucket , want fork 1 existing repository b. how can this? on website bitbucket allows fork in new repository.
i see 2 options:
if don't need bitbucket call fork can clone repository , push repository b. of "fork" is.
git clone git@bitbucket.com:user/repo cd repo git remote add my-clone git@bitbucket.com:you/repo-b git push --mirror my-clone
if need bitbucket call fork fork, can take advantage of fact bitbucket wikis repositories make local copy of wiki, delete repository b, fork repository repository b, push wiki repository b.
git clone http://bitbucket.org/you/repo-b/wiki repo-b.wiki cd repo-b.wiki # have @ files in repo-b.wiki , make sure complete # delete repository b bitbucket # fork repository repsitory b using bitbucket web ui # push wiki back: git push origin master
Comments
Post a Comment