How to remove a local Git repo from TortoiseGit?

20,270

Solution 1

Don't know about TortoiseGit but the git init command simply creates a (hidden) .git directory in the root of the repository and fills it with some needed files. So to undo an init all you need to do is to delete this .git directory. Note that some files in this directory can be write protected, so a warning dialog can appear. Please also note that all commits you have made in this repository will be lost (which should be no problem in your case).

However I don't know if this works or is enough when using TortoiseGit…

Solution 2

Remove the .git folder in your repository.

Solution 3

open git bash then execute below command

$ rm -rf .git

Share:
20,270
Admin
Author by

Admin

Updated on July 09, 2022

Comments

  • Admin
    Admin almost 2 years

    I started messing around with Git today. I think I've done something wrong because when I installed TortoiseGit it looks like a lot of folders in my C and F (second partition) have a green tick next to them (meaning the file is commited? I think?). What can I do to remove these ticks. Is there a way to NOT delete the actual files/folders but just a file or two that tells Windows to add a green tick to the icon? I'm a bit scared working with stuff like that on my C:. In other words - is there a way to undo the "init" action?! Please see image here http://i.stack.imgur.com/pKa1o.png

    I'm new to Git so sorry for non professional vocab in this question. Thanks.