A git tutorial from Liaoche creating a repository
First of all, it is clear that all version control systems, in fact, can only track changes in text files, such as txt files, Web pages, all the program code and so on, Git is no exception. The version control system can tell you every change, such as adding a word "Linux" to line 5th, and deleting a word "Windows" on line 8th. and picture, video these binary files, although can also be managed by version control system, but can't track file changes, only the binary files each change string up, that is, only know the picture changed from 100KB to 120KB, but what changed, version control system do not know, also can not know.
Unfortunately, Microsoft Word format is binary format, so the version control system is not able to track changes in Word files, the previous example is just to demonstrate that if you want to really use version control system, it is necessary to write the file in plain text.
Because the text is encoded, such as Chinese has a common GBK encoding, Japanese has SHIFT_JIS encoding, if there is no historical legacy issues, it is strongly recommended to use the standard UTF-8 encoding, all languages use the same encoding, no conflict, and supported by all platforms.
Children's shoes using Windows should pay special attention to:
Never edit any text file with a Notepad that comes with Windows. The reason is that Microsoft Development Notepad team used a very mentally retarded behavior to save UTF-8 encoded files, they are smart to add 0XEFBBBF (hex) characters at the beginning of each file , you will encounter a lot of incredible problems, for example, The first line of the page may show a "?", obviously the correct program is compiled to report grammatical errors, and so on, are caused by the mentally retarded behavior of Notepad. Suggest you download notepad++ instead of Notepad, not only powerful, but also free! Remember to set the default encoding for notepad++ to UTF-8 without BOM:
In a Windows environment, why edit with notepad++?