DQN-tensorflow
DQN-tensorflow copied to clipboard
git checkout fails on Windows 10
When I clone the repository, I get a message saying that the cloning succeeded but that the checkout failed:
$ git clone https://github.com/devsisters/DQN-tensorflow.git
Cloning into 'DQN-tensorflow'...
remote: Counting objects: 717, done.
remote: Total 717 (delta 0), reused 0 (delta 0), pack-reused 717
Receiving objects: 100% (717/717), 29.57 MiB | 1.26 MiB/s, done.
Resolving deltas: 100% (446/446), done.
fatal: cannot create directory at 'checkpoints/Breakout-v0/min_delta--1/max_delta-1/history_length-4/train_frequency-4/target_q_update_step-10000/memory_size-1000000/action_repeat-4/ep_end_t-1000000/backend-tf/random_start-30/scale-10000/env_type-simple/min_reward--1.0': Filename too long
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'
Apparently the path length becomes too long. In Windows, there is by default a max limitation of 260 characters for path lengths. It should be possible to turn this limitation off, but doing so doesn't seem to work for me (I even noticed that LongPathsEnabled
already was 1 since earlier).
Perhaps not surprisingly, git checkout -f HEAD
doesn't work either, and results in a very similar error message:
$ cd DQN-tensorflow/
$ git checkout -f HEAD
fatal: cannot create directory at 'checkpoints/Breakout-v0/min_delta--1/max_delta-1/history_length-4/train_frequency-4/target_q_update_step-10000/memory_size-1000000/action_repeat-4/ep_end_t-1000000/backend-tf/random_start-30/scale-10000': Filename too long
According to a stackoverflow thread this is a problem of the git client.
Using the advised
git config --system core.longpaths true
solved the issue for me (together with turning of the limitation via group policy).
The command might need to run with administrative privileges, depending on your UAC settings.
Thank you SimonRuehle, that worked!