To remove Git from project we can remove the .git folder using the Git command.
rm -rf .git*
The Git command rm -rf is used, rm removes a file from Git, and the -rf option of this command removes files recursively and forcefully. .git* removes the folder starting with .git.
I'm thinking you're in gitbash on Windows? Generally speaking,
rm
is not a git command (as ingit rm
which I seriously wonders if it would even see.git
).rm
is the *nux variant of removing a file. In fact, if you can see it, you'd probably be able to remove git from a project by deleting.git
by any means. (e.g. in the file explorer or finder.) Since it's local files, you can always make a copy and experiment with it without pushing anything.