gitintellij-ideabitbucketphpstormcore.autocrlf

Checking for line separator issue git?


I'm using PhpStorm and I did some work locally which I want to push to repo but I'm seeing this message and commit + push isn't working!

When I select files and hit commit or commit & push I get Checking for Git Username and then Checking for line separator issue git

I searched for some answers and found this command:

git config --global core.autocrlf true

I set it to true and tried to commit but the message ( Checking for line separator issue git ) is there. Even if I set it to false still the same message is showing!

Second try:

I added * text=auto in .gitignore file but still the message is showing.

And finally I tried the below commands but all in vain:

$ git config core.eol lf
$ git config core.autocrlf input

Note: I was facing the same issue previously but when I ran this command git config --global core.autocrlf true everything started working smoothly. But this time it isn't working.


Solution

  • After a lot of research I just found these two solutions:

    1) Copy the files where you have made changes and pull a new fresh repo and make changes in there and push it to repo

    2) Manually from Terminal add the files to git, commit it and manually run git push and your files will be pushed to repository successfully!

    Second method proper steps:

    Let say you have made changes in a.php and b.php or whatever files

    Open your terminal and add it to git like git add a.php and git add b.php

    Now commit your added files by typing git commit -m "Your message"

    and finally git push that's it!

    Note: While adding files to git you might require the full path of your file

    e.g git add D:\xampp\htdocs\project.com\apps\admin\modules\test\actions\test.class.php