PatPeter
PatPeter

Reputation: 432

How do I define a .gitattributes rule for a file with spaces in it?

I've read the documentation on .gitattributes and searched Stack Overflow for a simple answer to this question, but so far haven't found it. I have a file with spaces in it like so.

Reserved\ Slots.txt merge=mergeslots

I have also tried to use quotes instead of escaping the space.

"Reserved Slots.txt" merge=mergeslots

How do I use a custom merge driver for a file with spaces in it?

Upvotes: 8

Views: 2557

Answers (1)

Walter Laan
Walter Laan

Reputation: 2976

According to Whitespace in .gitattributes patterns use

[[:space:]]
# as in
has[[:space:]]spaces

Upvotes: 6

Related Questions