Annulation de l'indexation d'un fichier dans Git
Pour annuler l'indexation d'un fichier dans le système
Git, on utilise la commande restore,
avec l'option --staged,
suivie du nom du fichier.
Annulons l'indexation du
fichier :
terminalgit restore --staged file.txt
Après avoir vérifié le statut, un message apparaîtra dans le terminal indiquant que notre fichier est modifié, mais n'est pas indexé :
terminalChanges not staged for commit:
modified: file.txt
Задание 1
Indexez le fichier dans votre dépôt Git. Puis annulez son indexation.