Convert a Private Project on bitbucket.com to a github Public Project

  1. Create a public repo on github, you can add README or License files on the master branch, suppose the url is:

    https://github.com/leetschau/don4.git

  2. Get the private repo:

    $ git clone https://leechau@bitbucket.org/leechau/donno.git $ cd donno $ git branch -v -a (list all remote branches for checkout) $ git checkout -b develop origin/develop (copy remote branch to local repo and update working directory)

  3. Publish to github, you have 2 choices:

    i. Publish selected branches:

    $ git remote add don4 https://github.com/leetschau/don4.git
    $ git push -u don4 master
    $ git push -u don4 develop
    

    or you can push your "master" branch to remote as "init" branch for avoid confliction with master branch created on github:

    $ git push don4 master:init
    

    i. Publish all branches:

    $ git push --mirror https://github.com/leetschau/don4.git
    

    In this case you can't create README or License files when creating github project, to avoid conflict on master branch.

转载于:https://www.cnblogs.com/darkmatter/p/3605589.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值