Features

Better Line Endings Managing in IntelliJ IDEA 12

It happens quite often, that version control is used by people working on different platforms. This is why problems with line endings may appear. If you ever read the article from GitHub, you might already know, that Git can automatically address these problems. You just need to set git config --global core.autocrlf true on Windows or git config --global core.autocrlf input on Linux and OS X.

However not everyone follows the instructions and setups VCS correctly. That’s why we have made a couple of improvements in IntelliJ IDEA 12 to make life easier.

The IDE will show you the difference in line endings in the Diff Dialog, so you can fix this easily. This feature works even, if you compare files not from a repository.

The second feature, we have added, is only available for Git repository now. It analyzes your configuration and warns you before commit, if you are about to commit CRLFs into the repository. The dialog will offer to set core.autocrlf setting for you.

Note, if you have set any related git attributes on a file with CRLFs, this file won’t be analyzed. You know what are you doing if you have set it.

You can try these features now in the latest IntelliJ IDEA 12 EAP .

Feel free to share your feedback and submit bugs you find in our issue tracker.

Develop with Pleasure!

image description