0

How can I tell magit to use the --first-parent option?

I only want to see commits onto this branch, none from merged branches.

2

--first-parent is included in current versions of Magit, but at a higher level than is shown by default in the transient menus.

Refer to C-hig (transient)Enabling and Disabling Suffixes for how to control this.

From the Magit Log menu you can either:

  • Change the default level for that menu using C-x l C-x l to make all those hidden options visible.
  • Change the level of --first-parent specifically with C-x l =p, to include it at your current level.

Alternatively, you can customize transient-default-level.

3
  • Looks like C-x l is bound to count-lines-page. Using C-h k: "C-x l runs the command count-lines-page (found in global-map), which is an interactive compiled Lisp function in ‘page.el’." – young_souvlaki Jun 6 at 3:58
  • Did you type it with the magit log transient menu open? If so, which version of Magit are you using? – phils Jun 6 at 7:33
  • Yup, that was my problem! I was trying it from the log buffer, not the transient menu. Marking as solution. – young_souvlaki Jun 7 at 16:46

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.