I created a Git alias based off of the Git Immersion tutorial by EdgeCase that looks like this:
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
But now it seems to be paging the results — Terminal shows (END)
after the results are displayed, forcing me to hit Q to continue working. I read that by adding in the --no-pager
tag, you can disable this feature; how do I incorporate it into the alias? I've tried it at the end, before the log
, and right after, and none of them have worked. Git throws an error saying it is an unrecognized argument, or that it changes environment variables. Any advice?
The --no-pager option gives an
unrecognized option
error when used afterlog
, but it worked by putting --no-pager before log - "git --no-pager log .... " workedNote: with Git 2.18 (Q2 2018), the alias can use a shorter option for
--no-pager
:"
git --no-pager cmd
" did not have short-and-sweet single letter option. Now it does.The alias can now be:
See commit 7213c28 (03 May 2018) by Johannes Sixt (
j6t
).(Merged by Junio C Hamano --
gitster
-- in commit c9aac55, 23 May 2018)You can do that easily by just turning it into a shell command: