[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Git/Magit: To which branch was a commit was originally committed?

From: Sergey Organov
Subject: Re: Git/Magit: To which branch was a commit was originally committed?
Date: Tue, 02 Nov 2021 17:12:23 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Michael Heerdegen <> writes:

> Sergey Organov <> writes:
>> I think that closest thing to the original request would be a way to
>> list branches from which the commit in question is reachable if we
>> follow first parent only. This way branches to which the commit "was
>> merged" won't appear in the list. I dunno how to achieve it either in
>> Git or Magit without additional scripting though.
> After some quick experimentation I think it could be that moving point
> with `magit-log-move-to-parent' doesn't leave the current branch.  Seems
> also that the (checked out) master branch is also always the leftmost
> line in the graphical view.  Can anyone confirm?

Even though rather close, the leftmost column is not, strictly speaking,
the checked-out branch, it's rather the chain of commits that is the
result of following the first parent when traversing the history DAG
back starting from the current branch.

Essentially, this does give you the history of the master branch, taking
into account the workflow being used to manage Emacs Git repository.

As `magit-log-move-to-parent' without arguments seem to follow the first
parent, it will indeed either move over that leftmost column, or
eventually gravitate to it if you start at some side branch.

-- Sergey Organov

reply via email to

[Prev in Thread] Current Thread [Next in Thread]