2

When pushing on my server the post-receive hook runs a git clone command.

The command returns the following warning and I don't know what it means or how to resolve it. Googling the error gave only results concerning gitattributes and I haven't configured any attributes. My .gitignore file also has no exclamation marks or negative values inside.

remote: Cloning into '/var/www/html/gitrep'...        
remote: warning: Negative patterns are ignored in git attributes
remote: Use '\!' for literal leading exclamation.
Theo
  • 153
  • 1
  • 11

2 Answers2

1

Problem was solved by searching for every .gitattributes-file in the git repository.

One of these Files had a row starting with an exclamation mark which wasn't commented out that was causing this warning.

Theo
  • 153
  • 1
  • 11
0

In my particular case, my top level directory only had a few choices, so, since I know that I wanted to exclude, effectively, all files under a, and I only wanted the expansion to occur on all files under other_dir, then I changed the pattern to be:

other_dir/**/*.awk      ident
*.c                     ident

I found this link it might help you -

http://www.kehe.tech/questions/3254938/how-to-exclude-files-from-git-id-expansion

Mika Wolf
  • 169
  • 3