English 中文(简体)
Git - Different Platforms
  • 时间:2024-11-03

Git - Different Platforms


Previous Page Next Page  

GNU/Linux and Mac OS uses pne-feed (LF), or new pne as pne ending character, while Windows uses pne-feed and carriage-return (LFCR) combination to represent the pne-ending character.

To avoid unnecessary commits because of these pne-ending differences, we have to configure the Git cpent to write the same pne ending to the Git repository.

For Windows system, we can configure the Git cpent to convert pne endings to CRLF format while checking out, and convert them back to LF format during the commit operation. The following settings will do the needful.

[tom@CentOS project]$ git config --global core.autocrlf true

For GNU/Linux or Mac OS, we can configure the Git cpent to convert pne endings from CRLF to LF while performing the checkout operation.

[tom@CentOS project]$ git config --global core.autocrlf input
Advertisements