git ignoring .gitattributes pattern

后端 未结 7 2086
夕颜
夕颜 2020-12-16 20:45

I\'ve a directory structure like this:

root/
  .git
  deploy/
  Site/
    blah/
    more_blah/
      something.local
      else.development
    Rakefile
             


        
相关标签:
7条回答
  • 2020-12-16 21:48

    With git version 1.7.2.5, which is the default on debian squeeze (hence this post), there must not be a slash at the end to ignore a directory. So in order to ignore the deploy dir in the above question the following line must be used (no slash):

    deploy        export-ignore
    

    This is in contradiction to the documentation (man gitattributes / man gitignore) and the git book. The documentation of gitattributes references gitignore. Interestingly dirs with a slash (deploy/) work in a .gitignore file.

    I did not test later versions of git.

    0 讨论(0)
提交回复
热议问题