search

Home  >  Q&A  >  body text

What are the two files .gitignore and .gitattributes on github used for?

As mentioned, I use github for windows, and these two files will be automatically generated every time I create a project. Can anyone tell me what the use of these two files is? Can it be deleted? How to cancel automatic generation? Thanks!

怪我咯怪我咯2811 days ago781

reply all(3)I'll reply

  • 滿天的星座

    滿天的星座2017-05-02 09:28:09

    .gitigonre The file or directory you want to ignore

    • /mtk/ filter the entire folder

    • *.zip Filter all .zip files

    • /mtk/do.c Filter a specific file

    .gitattribute is used to set the comparison method of files (commonly used for non-text files)

    Reference address: https://git-scm.com/book/zh/v1/%E8%87%AA%E5%AE%9A%E4%B9%89-Git-Git%E5%B1%9E%E6 %80%A7

    reply
    0
  • 为情所困

    为情所困2017-05-02 09:28:09

    .gitignore is used to ignore files you don’t want to submit to Git

    .gitattribute specifies the comparison and merging method of non-text files

    reply
    0
  • 巴扎黑

    巴扎黑2017-05-02 09:28:09

    They are all useful. If you open it with a text editor and look at the content, you will know what it is for.
    The purpose is as mentioned above.

    reply
    0
  • Cancelreply