check if a commit is ascendent of a specific commit

3 messages, 2 authors, 2016-08-11 · open the first message on its own page

check if a commit is ascendent of a specific commit

From: Nguyen Thai Ngoc Duy <hidden>
Date: 2016-08-11 19:53:23

Hi,
I want to create "git-amend-commit" to be able to amend commits before
HEAD. So I need to check whether the commit I'm going to amend is
ascendent of HEAD. Is there any way to check that?
-- 

Re: check if a commit is ascendent of a specific commit

From: Nguyen Thai Ngoc Duy <hidden>
Date: 2016-08-11 19:17:42

On 11/11/06, Nguyen Thai Ngoc Duy [off-list ref] wrote:
Hi,
I want to create "git-amend-commit" to be able to amend commits before
HEAD. So I need to check whether the commit I'm going to amend is
ascendent of HEAD. Is there any way to check that?
Forget it. It's git-merge-base. Sorry for the noise

-- 

Re: check if a commit is ascendent of a specific commit

From: Jakub Narebski <hidden>
Date: 2016-08-11 20:17:29

Nguyen Thai Ngoc Duy wrote:
Hi,
I want to create "git-amend-commit" to be able to amend commits before
HEAD. So I need to check whether the commit I'm going to amend is
ascendent of HEAD. Is there any way to check that?
You can only amend topmost commit in any branch. Anything else would
be rewriting history, starting from amended commit upwards in lineage
(parentage).

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help