[英]How can I undo last local (not pushed) commit using git-plus?
As my question above I want to know how to undo last local (not pushed) commit using git-plus package in Atom text editor. 作为我上面的问题,我想知道如何使用Atom文本编辑器中的git-plus软件包撤消最后的本地(未推送)提交。 How can I undo last local commit?
如何撤消上一次本地提交?
Apparently you can not do that with git-plus. 显然,您不能使用git-plus做到这一点。 But with this simple command :
但是用这个简单的命令:
git reset --hard HEAD^
You can undo the last commit. 您可以撤消上一次提交。
Pay attention it is a hard reset, so you will loose any pending changes. 请注意,这是硬重置,因此您将丢失所有未决的更改。 You can
stash
them before. 你可以
stash
在他们面前。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.