How to disable (stop, remove, delete) the git versioning of a repository

4

I cloned a GitHub repository in my directory, but it came full of commits, that is, versioned. I wanted to restart it as a repository, from scratch, how do I?

I've tried the command: git reset (did not work).

What I want is the opposite of the git init command

    
asked by anonymous 05.12.2014 / 00:42

3 answers

9

Delete the hidden ".git" folder inside the repository, and make git init to start a new history.

    
05.12.2014 / 00:46
1

As already replied by dcastro, just remove the .git folder that is inside the repository. So you can start over.

If for some reason you do not want to download the history of a repository by cloning it, use the --depth flag as in the example:

git clone https://github.com/curl/curl.git --depth=1
    
01.08.2016 / 16:00
-2

I got the following command in linux / ubuntu

rm -rf .git
    
05.12.2014 / 14:05