How to disable (stop, remove, delete) git versioning of a repository
I cloned a GitHub repository in my directory, but it came full of commits, i.e. versioned. Wanted to restart it as a repository, from scratch, how do I?
Already tried the Command: git reset
(did not work).
What I want is the opposite of the command git init
5 answers
Delete The Hidden folder .git
inside the repository and run git init
to start a new history.
I managed with the following command on linux/ubuntu
rm -rf .git
As already answered by dcastro, just remove the folder .git
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 when cloning it, use the --depth flag as in the example:
git clone https://github.com/curl/curl.git --depth=1
G git rm file.txt
Changes to be submitted:
deleted: file.txt
G git commit-m " file.txt removed "
Https://medium.com/@andgomes/git-removendo-arquivos-de-um-reposit%C3%B3rio-7eed699a035f
With this command you can remove all the Tracheoed files.
rm -rf .git
On linux, there is no point in removing the .Git
folder that history returns.