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

git lfs blows up when a space is present in filename #298

Closed
kernelsmith opened this issue May 11, 2015 · 2 comments · Fixed by #327
Closed

git lfs blows up when a space is present in filename #298

kernelsmith opened this issue May 11, 2015 · 2 comments · Fixed by #327
Labels

Comments

@kernelsmith
Copy link

if I

git lfs track "file/with/a space in it"

all goes well until I do a push or similar, then I get

file/with/a is not a valid attribute name: .gitattributes:1

and manually adding quotes around the file name in .gitattributes doesn't help. This is pretty brutal. Is there a config option or somesuch that enables this behavior. I don't personally use spaces in file names, but some of my users do.

@technoweenie
Copy link
Contributor

Try editing your .gitattributes, using [[:space:]] in place of actual spaces.

file/with/a[[:space:]]space[[:space:]]in[[:space:]]it filter=lfs diff=lfs merge=lfs -crlf

This seems to be a limitation in the gitattributes file. But if [[:space:]] works, we can have git lfs track insert it in place of spaces pretty easily.

@kernelsmith
Copy link
Author

It's probably clear at this point that [[:space]] did fix the problem. Thanks for that as well as the PR to fix!

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

Successfully merging a pull request may close this issue.

2 participants