Skip to content

Instantly share code, notes, and snippets.

@thomaskanzig
Created January 15, 2023 15:55
Show Gist options
  • Save thomaskanzig/d0a5b2d3b08cd29a031d5787141c4a61 to your computer and use it in GitHub Desktop.
Save thomaskanzig/d0a5b2d3b08cd29a031d5787141c4a61 to your computer and use it in GitHub Desktop.
How to Remove Git from the Project

How to Remove Git from the Project?

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.

@erik-alm
Copy link

I'm thinking you're in gitbash on Windows? Generally speaking, rm is not a git command (as in git 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment