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
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
-
1OK magit has changed the magit-log-popup because the "r" now takes me to the reflog....– stsquadCommented Apr 24, 2015 at 14:20
-
what version of
magit
are you using? It works for me withmagit-20141025.429
.– user2005Commented Apr 24, 2015 at 18:29 -
2
-
@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.– stsquadCommented Apr 28, 2015 at 9:58
-
I updated the answer with the information from @phils comment.– user2005Commented Apr 28, 2015 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.
-
1As 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 atorigin/master...HEAD
(or(git merge-base master HEAD)~10
, say), i.e. never try to show all of the extensive history shared withorigin/master
? Commented Jul 9, 2015 at 0:22 -
1BTW, 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