git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Remove help advice text from git editors for interactive rebase and reword

From
Alexei Lozovsky <a.lozovsky@gmail.com>
Date
Jul 23, 2017, 12:42 UTC
Message-ID
<CALhvvbbud3oTTyzErQVumgUcdSPCcfGV4D31c66-J7P-jneqbQ@mail.gmail.com>
In-Reply-To
<241D60E0-1687-4DD8-A18C-CF7310DBFAEB@jetbrains.com>
On 23 July 2017 at 13:03, Kirill Likhodedov wrote:
Show 5 quoted lines
> Hello,
>
> is it possible to remove the helping text which appears at the bottom
> of the Git interactive rebase editor (the one with the list of
> instructions)

I believe currently there is not way to do it. The interactive rebase is implemented in git-rebase--interactive.sh which always makes a call to append_todo_help to append the help text to the todo list of commits.

> and the one which appears at the bottom of the commit editor (which
> appears on rewording a commit or squashing commits)?
This one too seems to be hardcoded in builtin/commit.c.
> I can parse and strip out the help pages (but it is not very reliable
> since the text may change in future)

I doubt the syntax of the interactive rebase todo list will ever change, so you can reliably remove all lines that are empty or start with the $(git config --get core.commentchar) or '#' if that's empty or 'auto'.

However, it's harder with the commit messages during --amend as the comment character is not really fixed and can be dynamically selected to not conflict with the characters used in the commit message if the core.commentchar is set to 'auto'.

> However I suppose that experienced command line users could also
> benefit from such configuration, since this helping text is intended
> only for newbies and is more like a noise for advanced users.

Well, the text is appended to the todo list of commits, so not that it gets too much in the way of editing the list by humans.

Previous: Kirill LikhodedovNext: Junio C Hamano
Message 2 of 7 in “Remove help advice text from git editors for interactive rebase and reword”
  1. Kirill LikhodedovJul 23, 2017
  2. Alexei LozovskyJul 23, 2017
  3. Junio C HamanoJul 23, 2017
  4. Kirill LikhodedovJul 23, 2017
  5. Jeff KingJul 24, 2017
  6. SZEDER GáborJul 24, 2017
  7. Junio C HamanoJul 24, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.