git stash عارضی طور پر آپ کی commit نہ کی گئی تبدیلیوں کو محفوظ کرتا ہے اور آپ کی working directory کو صاف حالت میں واپس کرتا ہے — تاکہ آپ context تبدیل کر سکیں (مثال کے طور پر کسی دوسری branch پر کوئی فوری bug ٹھیک کریں) بغیر نیم مکمل کام کو commit کیے، پھر بعد میں تبدیلیوں کو بحال کریں۔
مسئلہ جو stash حل کرتا ہے
You're mid-work with uncommitted changes, but need to switch context urgently:
→ switch branches? Git may refuse (uncommitted changes would conflict) or carry
them along messily
→ commit half-done work? No — it's not ready (pollutes history)
→ STASH saves your changes aside, giving you a clean working directory to switch.
