Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools

Basic 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

Hmm, 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

awesome! like I said been a LONG time since I have worked on a windows machine. Glad you got it figured out!

Tommy Morgan
STAFF
Tommy Morgan
Treehouse Guest Teacher

Mike Healy -

It 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:

  1. Use the --no-pager option when you run your command, e.g. git log --no-pager
  2. 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!

Great info, thanks Tommy.

haven't been on a windows machine in a long time..but try ctrl-z

or ctrl-c

Yep, used the classic "press keys one at a time until something works" technique.