How do I undo ‘git add’ before commit? (unstage) 🔙

Nicolas Carmont
2 min readFeb 15, 2021

1.) Undo ‘git add’ for a specific file 📄

Type into terminal:

 git reset <file>

This unstages the current file (the stuff listed in ‘git status’) without changing any actual code changes.

2.) OR unstage all files 📂

git reset

This does the same but for all files — so it uncommits them while still keeping the actual changes.

👏 THANKS: I appreciate your claps cause it takes time to write these free articles.

⚠️ 💻 IMPORTANT: If you’re building a webapp or website , it’s important you also think about:

  1. 🎥 Embedding a Youtube video into your website

2. 👥 Adding a thumbnail for sharing on social media:

3. 🎵 Play Audio on your HTML website

4. ✅ Free resources for images, icons, and more on your website

5. 🖼 Adding an icon to your website tab (HTML, favicon)



Nicolas Carmont

26K+ Reads ✍🏼 Co-founder & CTO @Connect Earth. Ex-Amazon 👨‍💻 Passionate about sustainability and software👌 Views are all my own.