Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I include --no-pager in a Git alias?

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?

like image 981
Ian Avatar asked Feb 23 '11 02:02

Ian


1 Answers

The --no-pager option gives an unrecognized option error when used after log, but it worked by putting --no-pager before log - "git --no-pager log .... " worked

like image 83
Vivek Karimbil Avatar answered Nov 04 '22 19:11

Vivek Karimbil