git ignoring .gitattributes pattern

后端 未结 7 2094
夕颜
夕颜 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:32

    Note: to ignore a directory, you needs to have a '/' at the end of said directory.

    Rakefile/
    

    For archive, like Arrowmaster mentions in his answer, and like the Pro Git book details, you need the export-ignore option:

    Rakefile/ export-ignore
    

提交回复
热议问题