I'd like to remove a file or directory that was sent to the Git repository erroneously, but without removing it from my local files. What command git
performs such action?
I'd like to remove a file or directory that was sent to the Git repository erroneously, but without removing it from my local files. What command git
performs such action?
Pass the --cached
parameter to git rm
:
git rm --cached arquivo.txt
For directories, remove recursively with -r
:
git rm --cached -r diretorio