vim, git, aws and other three-letter words

Software Development Notes

git: keep 'git log' and 'git diff' output on the screen

When git uses less as a pager, the output of commands like git log disappears from the console screen when you exit from less.

This is not convenient in many cases, so here is how to fix this.

A fix just for git commands:

git config --global --replace-all core.pager "less -iXFR"

For the less command, globally (including git), add the instruction below to your shell profile (.bashrc, .zshrc, etc.):

export LESS=-iXFR

Options we set for less:

Tags: git