Answer the question
In order to leave comments, you need to log in
How to solve git/phpstorm line separator problem?
Good morning.
Transferred the project from a laptop to a computer through copying, first from a laptop to a USB flash drive, then from a USB flash drive to a computer.
Saved phpstorm settings through settings export.
Now I'm trying to make a commit to git - this warning appears:
How to solve this problem? Select "Fix and Commit", won't this break the site on the server?
p.s. What could be causing this issue? On a laptop ubuntu 14.04 + php v.5.9, on a computer ubuntu 16.04 + php v.7.0
Answer the question
In order to leave comments, you need to log in
To you the message on "an error" gave already the answer to your question. You need to set up GIT, not PHPStorm. And even a command was written to you that you need to execute.
Nothing should break. It's just a way of wrapping lines in files.
How to solve this problem?
*.php text eol=lf
*.js text eol=lf
*.sh text eol=lf
*.sql text eol=lf
*.json text eol=lf
*.yaml text eol=lf
*.yml text eol=lf
*.yml.dist text eol=lf
*.xml text eol=lf
*.xml.dist text eol=lf
*.css text eol=lf
*.less text eol=lf
*.jade text eol=lf
*.twig text eol=lf
composer.lock text eol=lf
.htaccess text eol=lf
.bowerrc text eol=lf
.jshintrc text eol=lf
*.j2 text eol=lf
*.conf text eol=lf
*.md text eol=lf
If I understand the tasks correctly:
public bool IsContains(string[] mas, string name){
foreach(int i in mas.Length){
if(i.Contains(name) return true;
}
return false;
}
It's possible, of course, but it's not the best implementation.
public static void Main(string[] args)
{
string[] names = { "васе", "пете", "коле" };
var names2 = "Позвонить ";
var readline = Console.ReadLine();
//поиск имени
var word = names.FirstOrDefault(n => (names2 + n) == readline);
if (!string.IsNullOrEmpty(word))
{
Console.WriteLine("Вызов" + names.Aggregate((a, b) => a + ", " + b));
}
else
{
Console.WriteLine("Ошибка");
}
Console.ReadLine();
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question