ПО, ЭВМ и АСУ из Таможенного Союза

Информация о пользователе

Привет, Гость! Войдите или зарегистрируйтесь.


Вы здесь » ПО, ЭВМ и АСУ из Таможенного Союза » GNU/Linux » Как настроить кодировки в git


Как настроить кодировки в git

Сообщений 1 страница 2 из 2

1

так, чтобы на диске была нужная кодировка,
а внутри репозитория - utf-8?

сделать это совершенно точно можно, так как там даже проблему с концами строк решили.
значит и с кодировками запросто можно справится.

gui.encoding
    Specifies the default encoding to use for displaying of file contents in git-gui(1) and gitk(1). It can be overridden by setting the encoding attribute for relevant files (see gitattributes(5)). If this option is not set, the tools default to the locale encoding.

https://schacon.github.io/git/git-config.html

encoding
    The value of this attribute specifies the character encoding that should be used by GUI tools (e.g. gitk(1) and git-gui(1)) to display the contents of the relevant file. Note that due to performance considerations gitk(1) does not use this attribute unless you manually enable per-file encodings in its options.

https://schacon.github.io/git/gitattributes.html

некоторые сценарии использования в виндоус:
https://habr.com/post/74839/

Отредактировано Лис (2018-10-24 22:56:41)

0

2

Лис написал(а):

сделать это совершенно точно можно

Ох, может и не совершенно точно.

Но может можно как-нибудь на хуках?
https://github.com/Artalus/git-autounicode
https://www.medo64.com/2015/05/bom-away-in-git-style/

Отредактировано Лис (2018-10-25 02:36:38)

0


Вы здесь » ПО, ЭВМ и АСУ из Таможенного Союза » GNU/Linux » Как настроить кодировки в git