Git vrátit jeden soubor

Příklady kódu

3
0

git resetovat konkrétní soubor

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

git resetovat jeden soubor

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

Jak mohu obnovit nebo vrátit soubor ke konkrétní revizi?

git reset <commit hash> <filename>
2
0

git vrátit jeden soubor

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

vrátit nezměněné změny git

git checkout -- .
0
0

git revert commit pro jeden soubor

git checkout <commit_hash> path/to/file

V jiných jazycích

Tato stránka je v jiných jazycích

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