1

I borked my local codebase, so I mv'ed everything to another dir and then cloned the codebase from BitBucket. Now, all of the files are status "modified" (color light blue) in PhpStorm, but they are identical to what's in the repo.

Edit: when I look in VCS > Commit, it says "Contents have differences only in line separators," and remote is CRLF and my version is LF

After Git clone, how do I get the unmodified files in PhpStorm to show up as unmodified?

Andrew Koper
  • 6,481
  • 6
  • 42
  • 50
  • 2
    What does `git status` from command line look like? – jingx Nov 19 '20 at 22:01
  • What is your OS ? – LeGEC Nov 19 '20 at 22:52
  • Code is on a VMWare (Ubuntu) instance and that and PHPStorm are running on a Windows10 machine – Andrew Koper Nov 20 '20 at 15:02
  • @jingx when I Putty/SSH to the VM and use the command line, git status is good/clean/unmodified. When I use the terminal in PHPStorm to H: drive which mapped in Windows to the VM, git status is 22,000 modified files and "no changes added to commit." – Andrew Koper Nov 20 '20 at 16:02
  • My guess is something changed the eol characters in the files when you clone - could be git or phpstorm. Does this happen if you do another clean clone, this time from command line with plain `git clone` (i.e. have phpstorm out of the picture)? What does it show if you try to `git diff` one of the files on command line? – jingx Nov 20 '20 at 19:01
  • @jingx git diff in CLI shows no changes. In commit view in PHPStorm, it says "Contents have difference only in line separators" and remote is CRLF and my version is LF. – Andrew Koper Nov 23 '20 at 15:14
  • Check your `$HOME/.gitconfig`, and the `.git/config` in your project, and see if `core.crlf` is set to `true`? If the remote has CRLF, and you also work in Windows, there is no need to set it. – jingx Nov 23 '20 at 15:50

0 Answers0