Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Mike Healy
2,451 PointsBasic Git log questions
git log shows me a history of commits, but seems to open some interactive behavior which I don't know how to close. i.e. I'm not able to issue new git commands without closing my command prompt.
Git 1.8.1 on Windows.
Thanks
5 Answers

Mike Healy
2,451 PointsHmm, seems it only happens for a longer log. If I limit to a few commits there's no prob:
git log -2
Turns out pressing q gets me back out to the cmd

Tommy Morgan
Treehouse Guest TeacherIt looks like Git on Windows is configured by default to use a pager for all output past a certain size. In this case the pager is probably the UNIX program less
, which you can read more about here.
If you want to disable this functionality, you have a couple of options:
- Use the
--no-pager
option when you run your command, e.g.git log --no-pager
- Switch the pager command to
cat
for Git.cat
simply outputs the content to the terminal, so this would sidestep the use of a pager. You can do this with git config for just your current repository:git config core.pager cat
, or for all repositories on your computer:git config --global core.pager cat
.
Hope that helps!

Mike Healy
2,451 PointsGreat info, thanks Tommy.

Shawn Denham
Python Development Techdegree Student 17,801 Pointshaven't been on a windows machine in a long time..but try ctrl-z

Shawn Denham
Python Development Techdegree Student 17,801 Pointsor ctrl-c

Mike Healy
2,451 PointsYep, used the classic "press keys one at a time until something works" technique.
Shawn Denham
Python Development Techdegree Student 17,801 PointsShawn Denham
Python Development Techdegree Student 17,801 Pointsawesome! like I said been a LONG time since I have worked on a windows machine. Glad you got it figured out!