Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull/clone fails on Windows because of invalid characters #6

Closed
jonathannoah opened this issue Nov 30, 2021 · 2 comments
Closed

Pull/clone fails on Windows because of invalid characters #6

jonathannoah opened this issue Nov 30, 2021 · 2 comments

Comments

@jonathannoah
Copy link

The file code_snippets/Interlude:_Common_tasks.py causes checkout to fail on Windows due to the presence of a colon in the filename.

λ git clone --depth=1 https://github.com/learnbyexample/py_regular_expressions
Cloning into 'py_regular_expressions'...
remote: Enumerating objects: 45, done.
remote: Counting objects: 100% (45/45), done.
remote: Compressing objects: 100% (44/44), done.
remote: Total 45 (delta 3), reused 21 (delta 1), pack-reused 0R
Receiving objects: 100% (45/45), 892.26 KiB | 3.91 MiB/s, done.
Resolving deltas: 100% (3/3), done.
error: invalid path 'code_snippets/Interlude:_Common_tasks.py'
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'

Descending into the directory and running git restore --source=HEAD :/ restores the files except "Interlude:_Common_tasks.py". Running git config core.protectNTFS false followed by git checkout also checks out all the files, however "Interlude:_Common_tasks.py" is replaced with a 0-byte file called "Interlude".

@learnbyexample
Copy link
Owner

I didn't know that. Thanks for the issue. I've renamed the file now, please let me know if this resolves the issue.

@jonathannoah
Copy link
Author

jonathannoah commented Dec 1, 2021

Yep, works perfectly! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants