简体   繁体   中英

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. How can I undo last local commit?

Apparently you can not do that with 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM