threads / discuss / 49226

Git clean removing tracked files semi-regularly

Subject: Git clean removing tracked files semi-regularly

## tl;dr

4 messages between Aug 27, 2018 and Aug 28, 2018.

replies: 3people: 3as markdown or json

Brennan Conroy· Aug 27, 2018, 19:06 UTC · lore
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· Aug 28, 2018, 00:58 UTC · re: Brennan Conroy · lore

Re: Git clean removing tracked files semi-regularly

On Mon, Aug 27, 2018 at 07:06:59PM +0000, Brennan Conroy wrote:
Show 9 quoted lines
> 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· Aug 28, 2018, 18:29 UTC · re: brian m. carlson · lore

RE: Git clean removing tracked files semi-regularly

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:
Show 13 quoted lines
> 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· Aug 28, 2018, 19:59 UTC · re: Brennan Conroy · lore

Re: Git clean removing tracked files semi-regularly

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

← back to recent threads