git - 如何在托管服务提供商之间移动 git 存储库

标签 git github assembla

我目前使用 Assembla 作为我的 git 托管。我想将我的 git 存储库移动到 github 托管。我以前从未这样做过-过程是什么?显然,我想保留我以前的所有提交/更改等...

谢谢。

最佳答案

使用 git clone 将您的存储库 pull 到本地位置。

然后在 github.com 上创建一个新的仓库,删除旧的远程并添加新的远程:

git remote rm "assembla remote name"
git remote add origin git@github.com/your_repo_path
git push -u master

关于git - 如何在托管服务提供商之间移动 git 存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6672273/

相关文章:

git clone 并不能下载所有内容

git - 本地 Git 存储库的文件夹名称是否可以与存储在 Github 上的版本名称不同?

java - 推送project.properties问题

github - 具有编号标题的 Jekyll 帖子出现 "no implicit conversion of Integer into String"错误

android - 为什么带有一些配置文件的 _mac 文件夹会自动从 Android Studio 提交到 git

git - 如何编写有关提交的 .log 文件

git - Difftool 打不开,命令行挂起

github - 在 Golang 中实现 GitHub 徽章

php 运行 git 得到 "ssh Permission denied"

eclipse - 如何在不提交更改的情况下在 Eclipse 中切换分支