Sdk: Can't do git clean on windows, paths too long

Created on 15 Sep 2016  路  7Comments  路  Source: dotnet/sdk

Steps to reproduce

  1. Do a fresh clone on a windows box
  2. Build
  3. git clean -fdx (careful, see step 1)

    Expected behavior

It works

Actual behavior

Warnings (1 of many shown below), not everything is cleaned

warning: Could not stat path 'test/dotnet-publish.Tests/bin/Debug/netcoreapp1.0/PortableAppWithIntentionalDowngradePublishesDowngradedManagedCode/
PortableTests/PortableAppWithIntentionalManagedDowngrade/bin/Debug/netcoreapp1.0/PortableAppWithIntentionalManagedDowngrade.deps.json': 
Filename too long

Guessing CLI team doesn't use Windows much :grin: @eerhardt have you seen this?

Infrastructure

Most helpful comment

I have used this for a while with success: git config --system core.longpaths true. @nguerrera if this does not solve it for you, please, re-activate.

All 7 comments

Workaround: move test/ folder out of repo, and git reset --hard to get just the source back

http://ourcodeworld.com/articles/read/109/how-to-solve-filename-too-long-error-in-git-powershell-and-github-application-for-windows

I haven't tried it, but I'm hopeful :) Can you let us know if this works, @nguerrera ?

did you get a chance to try that out?

Not yet. Gotta wonder why this isn't the default.

agreed. probably worried people have exception-driven logic :-/

I have used this for a while with success: git config --system core.longpaths true. @nguerrera if this does not solve it for you, please, re-activate.

Using mingw/git bash on windows, I had to run git config --global core.longpaths true.

Was this page helpful?
0 / 5 - 0 ratings