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.
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.
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
Tommy MorganTreehouse Guest Teacher
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:
- Use the
--no-pageroption when you run your command, e.g.
git log --no-pager
- Switch the pager command to
catsimply 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!
haven't been on a windows machine in a long time..but try ctrl-z
Yep, used the classic "press keys one at a time until something works" technique.