1.简介
git-reset:将当前的HEAD重置为指定状态,也就是重置顶部commit的引用
2.概要
git reset [-q] [<tree-ish>] [--] <pathspec>…
git reset [-q] [--pathspec-from-file=<file> [--pathspec-file-nul]] [<tree-ish>]
git reset (--patch | -p) [<tree-ish>] [--] [<pathspec>…]
git reset [--soft | --mixed [-N] | --hard | --merge | --keep] [-q] [<commit>]
3.描述
在前三种形式中,将条目从<tree-ish>
复制到索引。在最后一种形式中,将当前分支头(HEAD
)设置为<commit>
,可以选择修改索引和工作树以进行匹配。该<tree-ish>
/<commit>
默认为HEAD
所有形式。
3.1 git reset [-q] [<tree-ish>] [--] <pathspec>…/git reset [-q] [--pathspec-from-file=<file> [--pathspec-file-nul]] [<tree-ish>]
这些表格会为与<pathspec>的状态相匹配的所
扫描二维码关注公众号,回复:
12412325 查看本文章
![](/qrcode.jpg)