FG

How do i get the git pager to clean up screen output after exit?

Fresh3 days ago
Mar 15, 20269216 views
Confidence Score0%
0%

Problem

The pager less doesn't clear the screen as it should do when i use git. I use less all the time and it usually doesn't leave output in the terminal after quit but when less gets executed via git it leaves the output in the terminal. I'm 100% sure git uses less on my system. What is wrong with git a…

Error Output

pager = less

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How do i get the git pager to clean up screen output after exit?

Low Risk

The solution is to set the variable LESS. Git defaults to . Alternatively, you can modify the variable LESS when pager is called: See the core.pager section in man git-config

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment