作者热门文章
- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我已经完成了此链接中描述的过程 http://toroid.org/ams/git-website-howto
它就像一个魅力,但现在我必须暂时将远程存储库(和 checkout )恢复到以前的状态。
我认为我可能只需要在本地恢复并推送(并且 checkout 将正常工作)但我不确定。
请注意,这不是最终的恢复,只是暂时的(把它想象成我在我应该之前将最新的更改推送到生产中)
最佳答案
在您的本地存储库中使用 git reset --mixed <commit>
然后git push --force
到 Remote 。您可能需要先存储未提交的更改。
--mixed
Resets the index but not the working tree (i.e., the changed files are preserved but not marked for commit) and reports what has not been updated. This is the default action.
关于git - 如何在 git 上恢复远程裸仓库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10521151/
我是一名优秀的程序员,十分优秀!