Currently when I bring up the local magit log ("l l") it takes a fair amount of time. It would be nice for the log just to limit itself to the nearest merge base (e.g. vs origin/master) but I haven't been able to work out how to do this.


magit-log accepts an optional range argument. You can also do l r l followed by origin/master and then HEAD.

In Magit 2.x you can use l o to the same effect. In this case you would specify a range using standard git range specifiers (typically the 'double-dot' notation):
l o origin/master..HEAD

  • 1
    OK magit has changed the magit-log-popup because the "r" now takes me to the reflog.... – stsquad Apr 24 '15 at 14:20
  • what version of magit are you using? It works for me with magit-20141025.429. – rekado Apr 24 '15 at 18:29
  • 2
    In Magit 2.x use l o – phils Apr 25 '15 at 8:10
  • @rekado: yeah I'm using magit/next (which I think has just gone to MELPA). If you update for both key sequences I'll accept the answer. – stsquad Apr 28 '15 at 9:58
  • I updated the answer with the information from @phils comment. – rekado Apr 28 '15 at 10:25

Beginning with v2.1.0 you can show logs for arbitrary branches, commits, and ranges using l o RET.

It's also possible to log commits from multiple branches at once by separating them with comas: l o , RET.

  • 1
    As the question asks how to limit commits to what's happened since "the nearest merge base", I think you mean l o origin/master..HEAD RET, is that right? To avoid having to type so many characters every time ("origin/master..HEAD" is 20 characters!), is there a way to set this as the default/everywhere, e.g. always limit commits at origin/master...HEAD (or (git merge-base master HEAD)~10, say), i.e. never try to show all of the extensive history shared with origin/master? – ShreevatsaR Jul 9 '15 at 0:22
  • 1
    BTW, magit is awesome, thank you so much for working on it and being here to answer questions. It has already enormously changed the way I work; I feel so much more powerful and productive. :-) – ShreevatsaR Jul 9 '15 at 0:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.