• Icon: Suggestion Suggestion
    • Resolution: Duplicate
    • None
    • Git
    • OS X 10.9
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      The Git commit textarea allows free form input. This is not helpful when writing git commit messages that can be easily read by other tools and on other platforms. For example, see Linus Torvalds' objection of using Github textarea for git commit messages

      http://programmers.stackexchange.com/questions/149199/why-do-some-open-source-projects-do-not-accept-pull-requests-but-emailing-patch

      Proposal
      =======
      Git commit text area can be customised to:

      1. Limit line length to 72/80
      2. Show hint of line length
      3. Hard wrapping of lines

          Form Name

            [SRCTREE-2700] Formatting of git commit message

            Can I suggest to insert a new line after the column guide? Because what happens with my current template that has a couple comments, is that by formatting it inserts a new line at the end of the commit. 

            This is currently what is happening:

            e.g.

             

            This text is over 72 characters and I want it to break into a new line below this one to

            This is my task related info, closes #issue or similar

            This text is over 72 characters and I want it to break into a new line below this one to

            This is my task related info, closes #issue or similar

            bind it to the guidelines; 

             

            I'd also like to see a guideline specific for the first line, for those who wish to use 50/72 standard (this guideline would only be visual, not working like the actual format)

            pedromabrunhosa91 added a comment - Can I suggest to insert a new line after the column guide? Because what happens with my current template that has a couple comments, is that by formatting it inserts a new line at the end of the commit.  This is currently what is happening: e.g.   This text is over 72 characters and I want it to break into a new line below this one to This is my task related info, closes #issue or similar – This text is over 72 characters and I want it to break into a new line below this one to This is my task related info, closes #issue or similar bind it to the guidelines;    I'd also like to see a guideline specific for the first line, for those who wish to use 50/72 standard (this guideline would only be visual, not working like the actual format)

            KieranA added a comment -

            We've been asked this a lot. We do (did) support a "Format to Guidelines" option which I just checked, but funnily enough it isn't working right now. If you enable the format guidelines in your SourceTree general preferences then you can context-click the text area for the commit message and hit 'format to guidelines' to force it to the correct width.

            There already is a hint of line length though. Just go to your general prefs to see the two options "Use fixed-width font for commit messages" (must be enabled) and "Display column guide in the commit message at character X".

            We probably do need to come back to this one though and figure something out.

            Cheers

            KieranA added a comment - We've been asked this a lot. We do (did) support a "Format to Guidelines" option which I just checked, but funnily enough it isn't working right now. If you enable the format guidelines in your SourceTree general preferences then you can context-click the text area for the commit message and hit 'format to guidelines' to force it to the correct width. There already is a hint of line length though. Just go to your general prefs to see the two options "Use fixed-width font for commit messages" (must be enabled) and "Display column guide in the commit message at character X". We probably do need to come back to this one though and figure something out. Cheers

              Unassigned Unassigned
              ac9157e9f13e Hanxue Lee
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: