Handling full content of git blame

I want to process complete output git blame

in a specific file. Some of the files are too long to fit on the screen, so the user needs to scroll line by line by pressing a key Enter

. Is there a command line option I am missing to print the full output? Alternatively, I could probably use the option -L

to define the start and end points of the line. However, this would require me to figure out how many lines the file has and run the command multiple times, which I would like to avoid.

+3


source to share


1 answer


Use --no-pager

arg:

git --no-pager blame file.name

      

Also, redirecting the output to a file will have the same effect:



git blame file.name > output.txt

      

You also have various ways to temporarily or permanently disable git paging through configuration core.pager

and different environments.

See How to prevent git diff from using a pager? for more information.

+7


source







All Articles