Saturday, June 25, 2022

Cloning an Enterprise Scale git repo fails with error file name too long

 When working with Microsoft Enterprise Scale for Azure, it creates a rather long folder structure in the git repo. So usually when setting up a new developer machine for the first time and try to clone the repo, Git throws and error stating that file names are too long.

To fix this, open a PowerShell window as administrator (this can be from within VS code as well) and run the following command:

> git config --system core.longpaths true

And then you can rerun the git clone command.

(If Git asks you to configure and on first commit, add the following from a window not opened as administrator, see more here):

> git config --global "John Doe"

> git config --global "")

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.