What is the gitattributes file and how does it control how Git handles specific files?

Git Hard

Git — Hard

What is the gitattributes file and how does it control how Git handles specific files?

Key points

  • Gitattributes assigns attributes to pathnames, not users or files directly
  • Attributes control various Git operations, including eol and merge drivers
  • The file affects how Git stores and manages files, including binary detection
  • Git LFS storage is also influenced by gitattributes settings

Ready to go further?

Related questions