core.autocrlf

Is there a way to determine the line endings in a existing git repo?

天涯浪子 提交于 2019-11-29 03:03:32
Is there a way to determine the line endings in a existing git repository? If I clone a existing repository how do I determine what core.autocrlf was used by the creator? I'm still uncertain whats the best setting for core.autocrlf e.g on a windows box (since there are multiple opinions: Distributing git configuration with the code or https://help.github.com/articles/dealing-with-line-endings ) Bonus question: Can you determine on windows (with standard tools) if a repo has mixed line endings (by wrong core.autocrlf setting) through all commits? To check what line endings were actually

How to to disable Git end-of-line (CRLF to LF) across all clones/machines?

风流意气都作罢 提交于 2019-11-28 16:18:51
问题 As one can glean from other posts, Git's end-of-line normalization has its pros and cons. I have one particular Windows-only project where I think the best thing to do is to is to disable end-of-line normalization altogether. That is, I want to leave all newlines (most of which are CRLF ) intact, rather than have git normalize them to LF -only behind the scenes, and I want that change to affect all clones of the repository on all machines. The question is the most effective way to do it. Most

Git on Windows: What do the crlf settings mean?

删除回忆录丶 提交于 2019-11-28 16:09:47
I don't understand the complexities related to CrLf settings in git: core.autocrlf , core.safecrlf I'm developing a cross-platform project in a team and would like both Windows and Linux developers to be able to work together without git marking files as modified just because of line ending style. What do the various settings mean? What would be the consequences of choosing any of the options? And what would be the best solution for my case? Yes, I'm aware of this question and the answers there were not insightful, thus not helpful. Cascabel The three values for autocrlf : true - when content

git config core.autocrlf is true, but I'm still getting a warning?

余生长醉 提交于 2019-11-27 23:09:46
问题 I understand that Windows uses CRLF and that it's good practice to let Git change line endings to LF before committing and back to CRLF when checking out. For that reason, I have core.autocrlf set to true. However, contrary to what other threads say (e.g., this), I am still getting this warning: warning: LF will be replaced by CRLF in [FILE_NAME]. The file will have its original line endings in your working directory. Firstly, I thought setting core.autocrlf to true was supposed to stop these

Is there a way to determine the line endings in a existing git repo?

≡放荡痞女 提交于 2019-11-27 17:14:55
问题 Is there a way to determine the line endings in a existing git repository? If I clone a existing repository how do I determine what core.autocrlf was used by the creator? I'm still uncertain whats the best setting for core.autocrlf e.g on a windows box (since there are multiple opinions: Distributing git configuration with the code or https://help.github.com/articles/dealing-with-line-endings) Bonus question: Can you determine on windows (with standard tools) if a repo has mixed line endings

Git on Windows: What do the crlf settings mean?

北战南征 提交于 2019-11-27 09:35:17
问题 I don't understand the complexities related to CrLf settings in git: core.autocrlf , core.safecrlf I'm developing a cross-platform project in a team and would like both Windows and Linux developers to be able to work together without git marking files as modified just because of line ending style. What do the various settings mean? What would be the consequences of choosing any of the options? And what would be the best solution for my case? Yes, I'm aware of this question and the answers

env: bash\\r: No such file or directory

走远了吗. 提交于 2019-11-27 06:52:29
I'm trying to install YouCompleteMe from here . When I execute: ./install.sh --clang-completer I get this error: env: bash\r: No such file or directory I don't know whats wrong with environment variables. Here's my bash path: which bash /bin/bash Do I need to change it to /usr/bash? If yes, then how should I do that? I tried changing ~/.bashrc file, but it didn't work. The error message suggests that the script you're invoking has embedded \r characters , which in turn suggests that it has Windows-style \r\n line endings instead of the \n -only line endings bash expects. As a quick fix , you

git status shows modifications even with autocrlf=false

感情迁移 提交于 2019-11-27 03:50:19
I'm experiencing the same issues as in this question: git status shows modifications, git checkout -- <file> doesn't remove them Git continues to show working directory modifications, even with git config --global core.autocrlf false : E:\_dev\github\Core [master +0 ~93 -0]> git config --get-all core.autocrlf false false (Note that I've even set the --system setting to be false ) Why does it appear that Git is still modifying my end of lines? Attempts to get rid of modifications Baseline E:\_dev\github\Core [master +0 ~93 -0]> git status # On branch master # Changes not staged for commit: #

env: bash\r: No such file or directory

浪尽此生 提交于 2019-11-26 12:08:36
问题 I\'m trying to install YouCompleteMe from here. When I execute: ./install.sh --clang-completer I get this error: env: bash\\r: No such file or directory I don\'t know whats wrong with environment variables. Here\'s my bash path: which bash /bin/bash Do I need to change it to /usr/bash? If yes, then how should I do that? I tried changing ~/.bashrc file, but it didn\'t work. 回答1: The error message suggests that the script you're invoking has embedded \r characters , which in turn suggests that

How line ending conversions work with git core.autocrlf between different operating systems

血红的双手。 提交于 2019-11-25 23:32:21
问题 I\'ve read a lot of different questions and answers on Stack Overflow as well as git documentation on how the core.autocrlf setting works. This is my understanding from what I\'ve read: Unix and Mac OSX (pre-OSX uses CR) clients use LF line endings. Windows clients use CRLF line endings. When core.autocrlf is set to true on the client, the git repository always stores files in LF line ending format and line endings in files on the client are converted back and forth on check out / commit for