git 放弃提交到提交之前

git reset HEAD^

原文地址:https://www.cnblogs.com/wanqieddy/p/3242565.html