gitubuntukonsole

Git log does not show anything on console


I am using Kubuntu 16.4. LTS. Recently, I have updated my packages using the following commands:

sudo aptitude update && sudo aptitude upgrade

Since then, the command git log does not provide any output.

When using git log > /tmp/gitlog.txt however, the file contains the desired output.

How can I get git log working back?


Solution

  • Make sure you are in a local git repo, and make that you have a least one commit.

    Your folder should include .git/ in it.

    git log does not show anything on console, but git log > /tmp/gitlog.txt writes commits into the file in the pipe.

    It may be a pager issue, which blocks the output on the console, but does not apply when redirecting to a file.
    Check with git --no-pager log.


    The OP lazyboy confirms in the comments an issue related to the pager:

    the idea with pager helps me to check my system.
    Some of startup scripts changed pager in my system and have affect to git.