git | understanding parent node{merge

  1. Suppose your feature branch brA has a commit hash1 at its tip; and master branch has hashJJ.
  2. Then you decide to 3-way-merge brA into master at merge commit hashMM.
  3. Then you commit on brA again at hash2.

Q: What’s the parent node of hash2?
A: I think git actually shows hash1 as the parent, not hashMM !

Q: is hashMM on brA at all?
A: i don’t think so but some graphical tools might show hashMM as a commit on brA.

I think now master branch shows hashJJ -> hashMM , and brA shows hash1 -> hash2.

I guess that if after the 3-way-merge, you immediately re-create (or reset) brA from master, then hash2’s parent would be hashMM.

FastForward merge is simpler.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s