Search code examples
gitintellij-ideapycharmwebstormjetbrains-ide

How to manually edit current hunk in PyCharm to commit


If i write a command git add -p I can manually edit the current and commit only the line I want:

enter image description here

But in PyCharm I do not know how to do this. I cannot separate each line, PyCharm selects both lines and does not allow me to select one:

enter image description here

Does anyone know how to do this in PyCharm?


Solution

  • Regrettably, there is no option to commit single linges in PyCharm.

    There is a feature request for that, please feel free to vote: https://youtrack.jetbrains.com/issue/IDEA-186988/Allow-commiting-only-specific-lines

    UPDATE:

    Please see comment from @VonC

    Indeed, VCS team is working on implementation of a ticket that is mentioned above