staging area (जिसे index भी कहते हैं) आपकी working directory और repository के बीच का एक मध्यवर्ती क्षेत्र है — जहाँ आप तैयार करते हैं कि अगले commit में कौन-से बदलाव जाएँगे। यह आपको ठीक-ठीक चुनकर commits को सटीक रूप से तैयार करने देता है।
Git के तीन क्षेत्र
WORKING DIRECTORY → your actual files (where you edit)
│ git add
▼
STAGING AREA (index) → changes PREPARED for the next commit (a staging zone)
│ git commit
▼
REPOSITORY (.git) → committed snapshots (the permanent history)
बदलाव इस तरह बहते हैं: आप फ़ाइलें edit करते हैं (working directory), चुने गए बदलावों को stage करता है (staging area), और stage किए गए बदलावों को एक commit के रूप में रिकॉर्ड करता है (repository)।
