// notes/

Git

Coding tips and build notes by Mahir Faysal, a student web developer in Bangladesh: tested Python, HTML, CSS, JavaScript and PHP tutorials, plus notes from my Next.js and Gemini projects. Sample posts are marked and drafts stay in the admin area.

Git Undo Last Commit but Keep Changes (Tested)
Coding tips

Git Undo Last Commit but Keep Changes (Tested)

Undo your last Git commit and keep the changes with git reset --soft HEAD~1, plus mixed, hard, reflog recovery, --amend and revert, each run on a real repo.

October 4, 2026 · 7 min read

// filter

You are inside a slice of the notes.

This view is only the category, tag, or search you asked for. Sample warnings still apply on any article that carries them. Drafts are still hidden. The full list is the learning notes page, which also explains how a note is written and why some posts are marked Sample.