14

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.

2 Answers 2

13

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

5
  • 1
    OK magit has changed the magit-log-popup because the "r" now takes me to the reflog....
    – stsquad
    Commented Apr 24, 2015 at 14:20
  • what version of magit are you using? It works for me with magit-20141025.429.
    – user2005
    Commented Apr 24, 2015 at 18:29
  • 2
    In Magit 2.x use l o
    – phils
    Commented Apr 25, 2015 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
    Commented Apr 28, 2015 at 9:58
  • I updated the answer with the information from @phils comment.
    – user2005
    Commented Apr 28, 2015 at 10:25
4

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.

2
  • 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? Commented Jul 9, 2015 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. :-) Commented Jul 9, 2015 at 0:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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