1

I am using git clone command

git clone <repo_url> <moveToDirectory>.

This command is working fine if moveToDirectory length is short, But if moveToDirectory length is long (i.e a with more folders), then this command is not working.

How can I use git clone in the second case?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
nitika
  • 303
  • 3
  • 12

2 Answers2

2

My problem is solved by using this solution

Filename too long in Git for Windows

git config --system core.longpaths true

The solution above did not work with git 1.17... version of git therefore I needed to upgrade my git to the latest version.

nitika
  • 303
  • 3
  • 12
0

What you can do is using the syntax:

git -C /long/path/to/parent/folder clone <url> directoryName

That will force Git to cd into the long path first, then clone to the folder.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250