Git ถอยหลังกลับกลายไปเป็นแฟ้มเดียว

รหัสตัวอย่าง

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 ถอยหลังกลับกลายไปเป็นแฟ้มเดียว

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

ถอยหลังกลับกลายไปเป็น unstaged เปลี่ยนแปลง git

git checkout -- .
0
0

git กลับไปใช้ค่าก่สำหรับแฟ้มได้ครั้งละหนึ่ง

git checkout <commit_hash> path/to/file

หน้าคล้ายกัน

คล้ายกันหน้ากับตัวอย่าง

ในภาษาอื่นๆ

หน้านี้อยู่ในภาษาอื่นๆ

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