Quick answer: run git restore --staged <file> (modern Git) or
git reset <file> (works everywhere) to unstage a file you added by mistake, before it's
committed.
A space for AI engineers to learn, share, and geek out — covering everything from LLMs and agents to the tools and tricks that make building with AI easier.
Showing posts with label Git Staging. Show all posts
Showing posts with label Git Staging. Show all posts
How to Undo git add Before You Commit (Unstage Files Safely)
Subscribe to:
Posts (Atom)