Git arms itself with several functionalities when it comes to handling text files. On a higher level let's understand the different file types and what they really mean using the following stack:
Going from the top to the bottom, it is a layered approach starting with how a user sees a file, how a computer sees it, until its storage at the bottommost layer.
Note
Binary data: Any file whose contents can be read only through specific programs, such as Microsoft Word for documents and picture viewer for images, is called binary data/values.
Text data: Any file, irrespective of its extension or nature, whose content is pure text and can be opened with a normal text editor like notepad or WordPad is considered to contain text data.
To quote an example for giving more clarity, open up your .git
directory inside your project, and you will see a file structure as shown in the following screenshot:
Here the file called index is considered to contain binary...