Github如何回退版本?
Copyright Notice: This article is an original work licensed under the CC 4.0 BY-NC-ND license.
If you wish to repost this article, please include the original source link and this copyright notice.
Source link: https://v2know.com/article/413
切换到工作目录,然后输入:
git log --pretty=oneline
你会看到多条记录,它们分别是由 Commit id+空格+名称 构成的。
选择一条你想回退的Commit id,然后输入:
git reset --hard [你的commit id]
然后,将修改推送到远程服务器:
git push -f -u origin master
然后重新拉取:
git pull
This article was last edited at 2020-08-14 18:24:58