git remove file without deleting code example
Example 1: git remove remote file keep local
# for single file
git rm --cached myfile
# for directory file
git rm --cached --r myfile
Example 2: git remove without deleting
For a single file:
git rm --cached mylogfile.log
and for a single directory:
git rm --cached -r mydirectory