emacs-devel
[Top][All Lists]
Advanced

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

Re: git log question


From: Yuri Khan
Subject: Re: git log question
Date: Thu, 30 Nov 2017 22:05:03 +0700

> I'm not sure what you mean by "reachable from a branch"; what I want is
> to find out whether a specific commit (identified by its hash) exists on
> the current branch -- not just whether it exists on some branch in the
> current repository -- and if so, to see that commit.

A Git repository is a directed acyclic graph of commits, each next
commit referencing the previous. The word “reachable” is used in its
usual graph theory meaning: that there exists a path that starts at
the head of the current branch, follows this child–parent
relationships, and ends in the commit you are interested in.

If you have a graphical display handy, run this:

    $ gitk master emacs-26 b407c521f2

It will show you how the graph is structured.

On a text-only terminal, this is an acceptable substitute for gitk:

    $ git log --oneline --graph master emacs-26 b407c521f2



reply via email to

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