⊗gtPmBsFU 30 of 65 menu

Unstaging of a file in Git

To unstage a file in Git, use the restore command, with the --staged flag followed by the file name. Let's unstage a file:

git restore --staged file.txt

After checking the status, a message will appear in the terminal stating that our file has been modified, but is not indexed:

Changes not staged for commit: modified: file.txt

Stage the file in your Git repository. Then unstage it.

English
БеларускаяDeutschEspañolFrançaisPortuguêsРусский
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline