1

Is it possible? PyCharm provides a nice textbox for editing the commit message, but it ignores line breaks and all the text end up as a single long header line in git.

I sometimes want to have a short header and then explain more later in the body and be able to see a concise header with git log --oneline

Here is a screenshot

3
  • 1
    Could you, please, attach a screenshot, because I don't use PyCharm, but I do use RubyMine and PhpStorm (same family) and never experienced your problem before? Commented Sep 15, 2015 at 19:00
  • Thank you for your screenshot, could you also show git log output? Also, it seems you have 2 blank lines between your commit header and commit body, although it is recommended to have only one. Commented Sep 15, 2015 at 19:15
  • using intelliJ (from Jetbrains too) and using git log with --abbrev-commit option, seems to work fine Commented Sep 15, 2015 at 19:18

1 Answer 1

4

Actually, Pycharm doesn't ignore line breaks, it just tries to show a commit message single lined for quick visualization purposes in some places but if you take a look at the logs' commit details you will see that the line breaks are still there. Here is a screenshot of a multi-line commit viewed from the logs:

enter image description here

Sign up to request clarification or add additional context in comments.

1 Comment

That's right. There must be an empty line between the header and the body. I got confused by auto-wrapping.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.