Github项目误删恢复记录

今天正常上线打卡,发现组织的线上Github仓库被误删了。。本来是一场悲剧,所幸在本地的垃圾箱中翻出了还没有删除的本地仓库,并且有完整的先前commit信息记录,于是乎这个原本无解的问题变成了Github的仓库迁移问题。

解决方法:

1.新建一个Github仓库,保证里面什么东西都没有;

2.通过命令行cd进本地仓库;

3.使用以下语句将本地代码及记录push到远程仓库:

git remote add origin xxx.git
git push -u origin master

2017.11

相关文章:

  • 2021-09-20
  • 2022-01-07
  • 2021-05-14
  • 2021-06-08
  • 2021-06-25
  • 2022-12-23
  • 2022-02-15
  • 2021-12-02
猜你喜欢
  • 2021-04-04
  • 2021-11-07
  • 2021-10-20
  • 2021-12-18
  • 2021-07-30
  • 2021-11-19
  • 2021-05-20
相关资源
相似解决方案