git

Posted on:

Git calls pager when needed. Git output will be easier to use if each is separated by section-delimiter. Also, it is recommended to set the jump-target to “section” accordingly.

It is recommended to set the following in gitconfig.

[core]
    pager = "ov -F"

[pager]
    diff = "ov -F --section-delimiter '^diff' --section-header"
    log = "ov -F --section-delimiter '^commit' --section-header-num 3"
    show = "ov -F --header 3"

(Please add --jump-target "section" if you like)

git log

The git log is separated by commit. You will be able to move by commit unit.

git log git log

git diff

git diff is separated by diff or file. You will be able to move in diff units. You can move to the next section (space key) or previous section (^ key) in one go.

git diff git diff

Furthermore, by specifying --section-header, the diff file name will be displayed even if you scroll.

git-section-header git-section-header

The above settings will display the search results in commit units. Normally, the search results are displayed at the top, so if it is in the middle of the line, you need to go back, but it will be displayed from the beginning of the commit.

git-jump-section git-jump-section