[Git] Use and Compare the Different git Reset Options: --hard, --soft, and --mixed
Posted answer1215
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[Git] Use and Compare the Different git Reset Options: --hard, --soft, and --mixed相关的知识,希望对你有一定的参考价值。
git reset
has three primary options that we might use: --soft
, --hard
and --mixed
(the default).
We‘ll use git reset
to undo the latest commit in all three ways, and compare the result of reseting with each flag.
git reset --soft HEAD~1 // keep staging but remove commit git reset --mixed HEAD~1 // remove staging and commit, but keep the changes git reset --hard HEAD~1 // remove the changes, commit, and staging
以上是关于[Git] Use and Compare the Different git Reset Options: --hard, --soft, and --mixed的主要内容,如果未能解决你的问题,请参考以下文章
Use the PDFs below or the HTML contents to the left to install and configure P6 EPPM and its additio
[Preact] Use State and Props in the Component Render Function
CXF报错[1 counts of IllegalAnnotationExceptions]and[Two classes have the same XML type name]and[Use @X
tp框架报“mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysq
[Git] Use git add --patch for better commit history and mitigating bugs
TypeError: can't compare offset-naive and offset-aware datetimes bugfix