# Git clean removing tracked files semi-regularly

4 messages from 2018-08-27 to 2018-08-28. Participants: Brennan Conroy, brian m. carlson, Derrick Stolee.
Thread: https://gitlist.dev/t/49226

## Brennan Conroy, 2018-08-27 19:06

Subject: Git clean removing tracked files semi-regularly
Message-ID: <MWHPR21MB0701CD1D9653E82116E482ECD60B0@MWHPR21MB0701.namprd21.prod.outlook.com>
URL: https://gitlist.dev/e/MWHPR21MB0701CD1D9653E82116E482ECD60B0%40MWHPR21MB0701.namprd21.prod.outlook.com

```
Hello, I work on a project that uses git. "git clean -xdf" is a common command to run to clean up the environment, however sometimes this command deletes the entire contents of two of the folders and all the files it deletes are being tracked which according to the documentation should not be deleted.

The project is located at https://github.com/aspnet/SignalR and the two folders it likes to delete are https://github.com/aspnet/SignalR/tree/release/2.2/clients/ts/signalr-protocol-msgpack and https://github.com/aspnet/SignalR/tree/release/2.2/clients/ts/signalr 

If you need me to collect git logs etc. please don't hesitate to ask!


```

## brian m. carlson, 2018-08-28 00:58

Subject: Re: Git clean removing tracked files semi-regularly
Message-ID: <20180828005803.GB432229@genre.crustytoothpaste.net>
URL: https://gitlist.dev/e/20180828005803.GB432229%40genre.crustytoothpaste.net
In-Reply-To: <MWHPR21MB0701CD1D9653E82116E482ECD60B0@MWHPR21MB0701.namprd21.prod.outlook.com>

```
On Mon, Aug 27, 2018 at 07:06:59PM +0000, Brennan Conroy wrote:
> Hello, I work on a project that uses git. "git clean -xdf" is a common
> command to run to clean up the environment, however sometimes this
> command deletes the entire contents of two of the folders and all the
> files it deletes are being tracked which according to the
> documentation should not be deleted.
> 
> The project is located at https://github.com/aspnet/SignalR and the two folders it likes to delete are https://github.com/aspnet/SignalR/tree/release/2.2/clients/ts/signalr-protocol-msgpack and https://github.com/aspnet/SignalR/tree/release/2.2/clients/ts/signalr
> 
> If you need me to collect git logs etc. please don't hesitate to ask!

It would be helpful to know more about your environment.  Is this only
reproducible on certain operating systems (e.g. case-insensitive ones)?
What version of Git are you using?  What does "git status" say before
you run git clean?
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204

```

## Brennan Conroy, 2018-08-28 18:29

Subject: RE: Git clean removing tracked files semi-regularly
Message-ID: <MWHPR21MB0701E9B53BC72CC33497AF45D60A0@MWHPR21MB0701.namprd21.prod.outlook.com>
URL: https://gitlist.dev/e/MWHPR21MB0701E9B53BC72CC33497AF45D60A0%40MWHPR21MB0701.namprd21.prod.outlook.com
In-Reply-To: <20180828005803.GB432229@genre.crustytoothpaste.net>

```
I'm using windows. Have had it happen on 8.1 and 10.

"git status" shows "nothing to commit, working tree clean". I am using git version 2.17.1.windows.2

-----Original Message-----
From: brian m. carlson <sandals@crustytoothpaste.net> 
Sent: Monday, August 27, 2018 5:58 PM
To: Brennan Conroy <brecon@microsoft.com>
Cc: git@vger.kernel.org
Subject: Re: Git clean removing tracked files semi-regularly

On Mon, Aug 27, 2018 at 07:06:59PM +0000, Brennan Conroy wrote:
> Hello, I work on a project that uses git. "git clean -xdf" is a common 
> command to run to clean up the environment, however sometimes this 
> command deletes the entire contents of two of the folders and all the 
> files it deletes are being tracked which according to the 
> documentation should not be deleted.
> 
> The project is located at https://github.com/aspnet/SignalR and the 
> two folders it likes to delete are 
> https://github.com/aspnet/SignalR/tree/release/2.2/clients/ts/signalr-
> protocol-msgpack and 
> https://github.com/aspnet/SignalR/tree/release/2.2/clients/ts/signalr
> 
> If you need me to collect git logs etc. please don't hesitate to ask!

It would be helpful to know more about your environment.  Is this only reproducible on certain operating systems (e.g. case-insensitive ones)?
What version of Git are you using?  What does "git status" say before you run git clean?
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204

```

## Derrick Stolee, 2018-08-28 19:59

Subject: Re: Git clean removing tracked files semi-regularly
Message-ID: <8ed02573-3356-9d38-c1ae-f5a2c82693c6@gmail.com>
URL: https://gitlist.dev/e/8ed02573-3356-9d38-c1ae-f5a2c82693c6%40gmail.com
In-Reply-To: <MWHPR21MB0701E9B53BC72CC33497AF45D60A0@MWHPR21MB0701.namprd21.prod.outlook.com>

```
On 8/28/2018 2:29 PM, Brennan Conroy wrote:
> I'm using windows. Have had it happen on 8.1 and 10.
>
> "git status" shows "nothing to commit, working tree clean". I am using git version 2.17.1.windows.2

I tested on my machine and could not reproduce this issue. Could you 
find a full repro (first command 'git clone 
https://github.com/aspnet/SignalR') and create an Issue at 
https://github.com/git-for-windows/git/issues ?

Thanks,

-Stolee


```
