【问题标题】:How to restore deleted repository on Github and keep all commit history?如何在 Github 上恢复已删除的存储库并保留所有提交历史记录?
【发布时间】:2016-03-16 12:49:38
【问题描述】:

我有一个已在 Github 上删除的旧仓库的本地副本。

这个本地副本只是一个简单的克隆(没有 -bare 或 -mirror),由:

git clone https://github.com/olduser/oldrepo.git

这个旧的 Github 用户帐户我已经失去了控制。

如何将这个已删除的 repo 上传回 Github,同时保留所有提交历史记录?

我想要的类似于将它恢复为分叉,并恢复到新位置:

https://github.com/newuser/newrepo.git

有可能吗?

【问题讨论】:

    标签: git github repository restore


    【解决方案1】:

    git remote set-url origin https://github.com/newuser/newrepo.git 后跟 git push origin 应该这样做。

    【讨论】:

      猜你喜欢
      • 2021-07-28
      • 2012-12-14
      • 2012-02-12
      • 2021-06-12
      • 1970-01-01
      • 1970-01-01
      • 2012-11-22
      • 1970-01-01
      相关资源
      最近更新 更多