dsaiztc
5/28/2017 - 3:05 PM

Remove a file from a Git repository without deleting it from the local filesystem https://stackoverflow.com/questions/1143796/remove-a-file-

Remove a file from a Git repository without deleting it from the local filesystem https://stackoverflow.com/questions/1143796/remove-a-file-from-a-git-repository-without-deleting-it-from-the-local-filesyste

git rm --cached mylogfile.log

For a directory:

git rm --cached -r mydirectory