开发者

Git log output messed up

When I do git log in certain places the output is messed up and it doesn't bring me back to the command line. In some of my r开发者_Go百科epos it works fine however. Any ideas? Output is pasted below:

[server]$ git log
commit c84acb29115822d94fe0112bacfb835911ffaa11
Author: My Name <myname@server.dreamhost.com>
Date:   Sun Feb 14 03:13:05 2010 -0800

   Correct spelling mistake

commit 4f613bdddc2b4965b75914c08017a916fa3d07be
Author: My Name <myname@server.dreamhost.com>
Date:   Sat Feb 13 08:39:52 2010 -0800

   slightly better gradient

commit 96d2a2bb74c287af18a491f616ce784cc30ff1ea
Author: My Name <myname@server.dreamhost.com>
Date:   Sat Feb 13 08:31:15 2010 -0800

   Add gradient background under menu

commit 80fab463530791e6e9ebb06e475b67211b88a8d4
Author: My Name <myname@server.dreamhost.com>
Date:   Fri Feb 12 14:33:04 2010 -0800

   change copy back

commit f0952894251854432a6b960d39460a926c819202
Author: My Name <myname@server.dreamhost.com>
Date:   Fri Feb 12 13:49:23 2010 -0800

   change copy

commit a0ff98ffc7a2359149842e96cafefbf29f8fe93d
Author: My Name <myname@server.dreamhost.com>
Date:   Fri Feb 12 13:31:57 2010 -0800

   Add ignore file and deploy script

commit c5f21ee90b13e5e8ad542875a9525c4775f298e4
Author: My Name <myname@server.dreamhost.com>
Date:   Fri Feb 12 09:09:04 2010 -0800

   make noie6 page very basic

commit 07e2765446ac4071804b9b13f4396635252a8090
Author: My Name <myname@server.dreamhost.com>
Date:   Fri Feb 12 08:25:17 2010 -0800
:


That's because your terminal is paging the results through less—the same program used in the man pages. You can navigate the full log with your up/down arrow keys.

Pressing q will exit and bring you back to the terminal.


If you don't want to use a pager, set the GIT_PAGER environment variable to cat.

On Windows:

C:\> set GIT_PAGER=cat
C:\> git log

On Unix:

$ GIT_PAGER=cat git log

You can also use git's --no-pager option:

$ git --no-pager log


There is a colon in the last line, which means the output is being paged, so you can use SPACE and other keys available in paging programs.


A colon (:) on the last line after executing "git log" command means that the output is not being shown as a whole but partially and divided into "pages" you can say. The colon (:) is a prompt telling you to go to the next page of the output which you can do by pressing up/down keys to page up/page down. If you want to exit the output, you can press the "Q" key.


Ok, I've realised you can ctrl+z out of this to get back to the command line.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜