Search code examples
intellij-ideaversion-controlwebstormjetbrains-ide

How to avoid files selected in JetBrains change list (Git) to also include new changes on the same file?


So this is the thing: I'm migrating from VSCode to JetBrains products and I would like to get a behavior similar to VSCode regarding source control.

In VSCode, when you see all your changes to your files and mark them for commit, they are indeed git staged and therefore, new changes to an already marked file (staged) will not be marked by default (those changes are not staged yet).

However, JetBrains "changes lists" concepts does not work that way, as marking a file for commit (checking the checkbox near it) does not stage that file nor does nothing regarding git. It's all handled by the IDE. So if I change a file, checks it in the changes list, and the updates it, new changes are already checked as the whole file was checked before.

I hope I've explained myself correctly.

How can a get a behavior like VSCode regarding source control?


Solution

  • You can enable Git staging area Preferences | Version Control | Git. Check Enable Staging area But prior to this, please, make sure that Use non-modal commit interface is enabled under Preferences | Version Control | Commit

    Otherwise, if you can keep Changelists feature enabled, you may find useful a feature Allow putting changes within one file into different changelists under Preferences | Version Control | Changelists