2

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?

LazyOne
  • 158,824
  • 45
  • 388
  • 391
Ivan
  • 23
  • 3

1 Answers1

1

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

Ruslan Kuleshov
  • 1,934
  • 1
  • 7
  • 11
  • 2
    This issue is starting (June 2023) to evolve. See "[PyCharm git commit split code block change](https://stackoverflow.com/a/76491897/6309)". – VonC Jun 16 '23 at 16:13