Git revert一个文件

代码示例

3
0

git重置特定文件

git checkout c5f567 -- file1/to/restore file2/to/restore
3
0

git重置一个文件

git checkout HEAD -- my-file.txt
3
0

如何将文件重置或还原为特定修订版本?

git reset <commit hash> <filename>
2
0

git revert一个文件

git checkout HEAD -- /directory/my-file.txt
0
0

恢复未分页的更改git

git checkout -- .
0
0

git revert提交单个文件

git checkout <commit_hash> path/to/file

其他语言

此页面有其他语言版本

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................