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)
Changes ਦਾ ਵਹਾਅ: ਤੁਸੀਂ ਫਾਈਲਾਂ ਵਿੱਚ ਸੋਧ ਕਰਦੇ ਹੋ (working directory), ਚੁਣੀਆਂ ਗਈਆਂ ਤਬਦੀਲੀਆਂ ਨੂੰ stage ਕਰਦਾ ਹੈ (staging area), ਅਤੇ staged ਤਬਦੀਲੀਆਂ ਨੂੰ ਇੱਕ commit ਦੇ ਤੌਰ ਤੇ ਰਿਕਾਰਡ ਕਰਦਾ ਹੈ (repository)।
