Git global Config: Difference between revisions
Jump to navigation
Jump to search
Created page with "{{TOCright}} == See also == <span class="editsection">top</span> == Reference == <span class="editsection">top</span> <references/> Category:Git..." |
mNo edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{TOCright}} | {{TOCright}} | ||
The Git Config is important in particular when you enter into strange and incomprehensible problems/issues. | |||
== Line Endings == | |||
A very common cause for trouble are line endings. | |||
=== What are line endings === | |||
Operation systems using different ''definitions'' for ending a line in a plain-text-file. | |||
<br>When users are using different Operating Systems they are also using different Line Endings. | |||
{| class="wikitableharmcenter" width="550px" | |||
! width="40%" | OS | |||
! width="15%" | Encoding | |||
! width="15%" | Abbreviation | |||
! width="15%" | Hex | |||
! width="15%" | 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 === | |||
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 <ref>[https://help.github.com/articles/dealing-with-line-endings GitHub], Line Endings.</ref><ref>[https://git-scm.com/book/id/v2/Customizing-Git-Git-Configuration Git-SCM], Git Docu Global Config.</ref> | |||
<pre> | |||
# 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 | |||
</pre> | |||
== See also == | == See also == | ||
Line 8: | Line 43: | ||
<references/> | <references/> | ||
[[Category:Git]] | [[Category:Git|Config]] | ||
[[Category:Index]] | [[Category:Index]] |
Latest revision as of 22:26, 7 February 2019
The Git Config is important in particular when you enter into strange and incomprehensible problems/issues.
Line Endings
A very common cause for trouble are line endings.
What are line endings
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
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