# Mystery c:\\.git folder - solved

**URL:** <https://discourse.itk.org/t/mystery-c-git-folder-solved/47>\
**Category:** Community\
**Created:** [September 22, 2017, 5:04am UTC](https://discourse.itk.org/t/mystery-c-git-folder-solved/47 "2017-09-22T05:04:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lassoan](https://discourse.itk.org/user_avatar/discourse.itk.org/lassoan/32/27_2.png) [@lassoan](https://discourse.itk.org/u/lassoan)\
**Post date:** [September 22, 2017, 5:04am UTC](https://discourse.itk.org/t/mystery-c-git-folder-solved/47/1 "2017-09-22T05:04:51Z")

</div>

Many of us suffered from the annoyance of a .git folder keep popping up in the root folder - see for example the discussion below.

Good news: the mystery is now solved, it was due to a copy-paste error in a git hook file copying script. [Pull request was submitted](https://github.com/SimpleITK/SimpleITK/pull/300) with a proposed fix.

> From: Dženan Zukić [[mailto:dzenanz@gmail.com](mailto:dzenanz@gmail.com)]  
> Sent: Monday, July 25, 2016 11:38 AM  
> To: Andras Lasso [lasso@queensu.ca](mailto:lasso@queensu.ca)  
> Subject: Re: [vtkusers] [ITK-dev] c:.git\hooks
> 
> Pain is smaller when I know that I am not the only one suffering 😃
> 
> On Mon, Jul 25, 2016 at 11:36 AM, Andras Lasso [lasso@queensu.ca](mailto:lasso@queensu.ca) wrote:  
> I have the issue, too. Unfortunately, we almost work on the same projects (Plus , Slicer – with all its dependencies) so we still don’t know what can cause this.
> 
> Andras
> 
> From: vtkusers [[mailto:vtkusers-bounces@vtk.org](mailto:vtkusers-bounces@vtk.org)] On Behalf Of Dženan Zukic  
> Sent: July 25, 2016 11:32  
> To: Brad King [brad.king@kitware.com](mailto:brad.king@kitware.com)  
> Cc: vtkusers [vtkusers@vtk.org](mailto:vtkusers@vtk.org); ITK developer mailing list [insight-developers@itk.org](mailto:insight-developers@itk.org)  
> Subject: Re: [vtkusers] [ITK-dev] c:.git\hooks
> 
> I ran all the SetupForDevelopment scripts in ITK git folder. The C:/.git folder was not created. Thanks for suggestion though.
> 
> This problem is not annoying enough because it is easy to solve by deleting C:/.git folder. I will not spend more time randomly examining everything git-related. If somebody else comes forward with the same problem then we might be able to determine what we have in common and narrow down the problem to perhaps make it reasonably tractable.
> 
> So if anyone runs into this, don’t be shy!
> 
> On Fri, Jul 22, 2016 at 9:14 AM, Brad King [brad.king@kitware.com](mailto:brad.king@kitware.com) wrote:  
> On 07/22/2016 09:00 AM, Dženan Zukić wrote:
> 
> > occasionally, a folder “C:.git\hooks” appears on my computer.  
> > [snip]  
> > but support people think that git hooks in some of my projects  
> > (almost all instances of ITK, VTK and Slicer builds) are causing  
> > this behavior. Did anyone else encounter this or something similar?
> 
> Dig through our Utilities/SetupForDevelopment.sh scripts (or equivalent  
> in each project) and the scripts it invokes. See if running any of  
> them causes this to happen. Otherwise check whether running CMake on  
> each project causes it in case there is any attempt to install hooks  
> that way.
> 
> You’ll likely have to diligently check for the folder after each step  
> of working with each project until you figure out which one causes it.
> 
> -Brad

---

<div class="post-metadata">

**Author:** ![fbudin](https://discourse.itk.org/user_avatar/discourse.itk.org/fbudin/32/14_2.png) [@fbudin](https://discourse.itk.org/u/fbudin)\
**Post date:** [September 22, 2017, 12:38pm UTC](https://discourse.itk.org/t/mystery-c-git-folder-solved/47/2 "2017-09-22T12:38:58Z")

</div>

Awesome! Thanks for figuring this out and submitting a patch!

Francois

---

<div class="post-metadata">

**Author:** ![blowekamp](https://discourse.itk.org/user_avatar/discourse.itk.org/blowekamp/32/79_2.png) [@blowekamp](https://discourse.itk.org/u/blowekamp)\
**Post date:** [September 22, 2017, 1:08pm UTC](https://discourse.itk.org/t/mystery-c-git-folder-solved/47/3 "2017-09-22T13:08:04Z")

</div>

Great job tracking this down!

---

<div class="post-metadata">

**Author:** ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)\
**Post date:** [September 22, 2017, 1:26pm UTC](https://discourse.itk.org/t/mystery-c-git-folder-solved/47/4 "2017-09-22T13:26:12Z")

</div>

I love you Andras! ❤
