Files
tldr/pages.zh/common/git-reset-file.md

342 B
Raw Blame History

git reset-file

将文件还原为HEAD或某个提交。 这是git-extras的一部分。 更多信息:https://github.com/tj/git-extras/blob/master/Commands.md#git-reset-file

  • 将文件重置为HEAD

git reset-file {{path/to/file}}

  • 将文件重置为特定提交:

git reset-file {{path/to/file}} {{commit_hash}}