Git recovery cheatsheet — un-break anything
The commands that get you out of trouble: recover deleted commits, undo a bad merge, and rescue work from a detached HEAD.
ของ lazyyy เอง · อัปเดต 9 ส.ค. 2569
ส่วนประกอบ
Git recovery cheatsheet
# recover a "lost" commit (reflog remembers for ~90 days)
git reflog
git checkout -b rescue <sha>
# undo the last commit but KEEP the changes staged
git reset --soft HEAD~1
# throw away all local changes to a file
git restore --source=HEAD -- path/to/file
# abort a merge gone wrong
git merge --abort
# you committed on detached HEAD — save it
git branch keep-my-work
Golden rule: git reflog first, panic never.
ซองใกล้กัน
Docker cleanup cheatsheet — reclaim disk fast
The commands to find and reclaim the tens of GB Docker quietly eats — images, build cache, volumes, and dangling layers.
git
ของ lazyyy เอง · อัปเดต 9 ส.ค. 2569
PR description writer — from diff to review-ready
Generates a crisp PR description: what changed, why, how it was tested, and the risk — from the branch diff.
prompt-engineering · git
ของ lazyyy เอง · อัปเดต 9 ส.ค. 2569
Conventional Commit message generator
สร้าง Conventional Commit message จาก staged diff อัตโนมัติ — ระบุ type, scope และ subject line ที่ชัดเจนตามมาตรฐาน พร้อมตัวอย่างหลากหลาย type, วิธีตั้งค่า git alias ทีละขั้นตอน และคำเตือนเกี่ยวกับการส่งข้อมูลลับ
prompt-engineering · git
ของ lazyyy เอง · อัปเดต 9 ส.ค. 2569