text 将Repo从Bitbucket移动到Github

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text 将Repo从Bitbucket移动到Github相关的知识,希望对你有一定的参考价值。

# Create a new empty repository in GitHub (without readme or licesne. empty!)

# then copy down your bitbucket repo. --mirror helps you get everything.
git clone --mirror https://bitbucket.org/exampleuser/repository-to-mirror.git

cd repository-to-mirror/

# update the URL used as the remote
git remote set-url origin git@github.com:User/UserRepo.git

# push everything up to the new github repo
git push --mirror

# go to github.com and make sure your new repo has everything

# optional: migrate any issues from bitbucket to github?
# dunno how to do this programatically :(
# maybe this: https://github.com/jeffwidman/bitbucket-issue-migration


# optional: migrate a wiki?
	
	# clone the bitbucket wiki next to the main repo 
	cd ../
	git clone git@bitbucket.org:dylan_k/poems.git/wiki wiki1
	
	# on github site, setup a new, blank wikie

	# Clone the (new, blank, github) wiki locally
	$ git clone https://github.com/YOUR_USERNAME/YOUR_REPOSITORY.wiki.git wiki2

	#locally, copy everything from wiki1 to wiki2

	#push wiki2

	# remove wiki1

	#rename wiki2 to be just wiki 


# on the bitbucket website, delete the old bitbucket repo and give a link to the new github one.

以上是关于text 将Repo从Bitbucket移动到Github的主要内容,如果未能解决你的问题,请参考以下文章

团队成员无法从 BitBucket 克隆 repo?

如何像GitHub一样从Bitbucket服务器添加文件到repo上

text 将比特从Bitbucket转移到Github

直接从 Bitbucket 部署到 AWS Elastic Beanstalk

Bitbucket repo:将 webhook 推送到无人机失败

Bitbucket 2.0 API 将所有提交合并到 master