git rm ¶
See also
git rm [fichier] ¶
git rm [fichier]
supprime le fichier du répertoire de travail et met à jour l’index.
git rm –cached [fichier] ¶
git rm --cached [fichier]
supprime le fichier du système de suivi de version, mais le préserve localement.
Remove file from last commit ¶
Let’s say you committed a file by mistake. You can quickly remove that file from the last commit by combining rm and commit –amend commands
git rm --cached <file-to-remove>
git commit --amend