How to make git log not prompt to continue?

Git has an option to disable the pager:

git --no-pager log --decorate=short --pretty=oneline -n1

If your pager cuts lines and you want to retain that behaviour, either pipe to cut

git --no-pager log --decorate=short --pretty=oneline -n1 | cut -c 1-$COLUMNS

…or set the environment variable GIT_PAGER before the invocation:

GIT_PAGER="cut -c 1-${COLUMNS-80}" git log --decorate=short --pretty=oneline -n1

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)