How to remove a file/folder from GIT but keep it in the file system

Using the below commands will remove the file/folder from GIT but will also remove them from the local file system

So how can I remove this file/folder from the repo without deleting them in my local file system

So the conclusion is git rm removes a file from the working directory and the index and when you commit, the file is removed from the tree as well while¬†git rm –cached¬†removes the file from only the index and keeps it in your working copy.