A
A
Alexander risok2021-11-03 13:34:23
git
Alexander risok, 2021-11-03 13:34:23

How to see the graph of all parents of a given branch?

e.g. temp1 => feature1 => main

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lynn "Coffee Man", 2021-11-03
@Lynn

I think that we need to read again what branches and commits are in git.
There is no relationship between branches in git. A branch is just a pointer to a commit. Each commit has a parent(s) and that's it.
Those. not “from the main branch create feature1”, but “create a new pointer to the commit that the main branch now points to (or more often just the current commit) and call it feature1”. Everything. feature1 doesn't know anything about any main branch, so the question about the branch's parent is meaningless.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question