in Technology by (1.9m points)

How will you remove a file from Git without actually removing it from your local filesystem?

1 Answer

0 votes
by (1.9m points)

You can use the ‘cached’ option for this:

git rm -rf –cached $FILES

This command will remove the files from your repository without deleting them from your disk.