chelder
chelder

Reputation: 3897

Theoretical doubts about changing a parent node and the effect to its children

As you probably guess I'm a beginner with Git. My questions:

Thank you for your help :)

Carlos

Upvotes: 0

Views: 112

Answers (1)

jthill
jthill

Reputation: 60555

Going by your comment, where the git term for what you call a node is "branch", the answers are no and no

Going by Shahbaz's thought (which was also mine, commits actually being nodes in the commit history graph), the answers are still no.

You can't actually change commits. You can change which commit a reference (like a branch or tag name) refers to. That's what the commit and rebase and merge and all the rest do: they add new commits to the graph and usually make your current branch's name refer to that latest. The older commits are still there, with all their structure intact. After about three months they'll be subject to garbage collection if nothing refers to them -- but in your scenario the child branches still refer to what they always did, so their histories remain, unchanged.

Upvotes: 1

Related Questions