Git global Config

From HaFrWiki
Jump to: navigation, search

The Git Config is important in particular when you enter into strange and incomprehensible problems/issues.

Line Endings[edit]

A very common cause for trouble are line endings.

What are line endings[edit]

Operation systems using different definitions for ending a line in a plain-text-file.
When users are using different Operating Systems they are also using different Line Endings.

OS Encoding Abbreviation Hex Escape
Apple OS-X / Unix ASCII LF 0A \n
IBM z/OS EBCDIC NL 15 \025
Windows ASCII CR + LF 0D 0A \r \n

VCS Line Endings[edit]

Version Control Systems may try to handle the line endings difference for Operation Systems. Git does! And it also have a settings in the Global Config [1][2]

# Shows all git global config settings and the storage place.
$ git config --list --show-origin

# Sets the global config settings for the line endings on mac OS-X
$ git config core.autocrlf input

See also[edit]




  1. GitHub, Line Endings.
  2. Git-SCM, Git Docu Global Config.