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:

  1. 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 
  2. 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

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -