Git Push and the Remote Branch Tip

A push sends needed objects and requests reference updates on the remote. Succeeding on one branch does not advance another branch.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Trace a published topic
  2. Check the mechanism consuming the tip
  3. Match source, destination and ancestry explicitly
  4. Verify the remote marker that users actually depend on

Trace a published topic

Pushing an experiment branch can make its commits available on the server while the main branch still points to its prior commit. A deployment using main will then see the earlier source. See branches as references.

Check the mechanism consuming the tip

A deployment result also depends on a build and release process. Verify the exact deployed commit when a remote update is successful but pages are unchanged. A commit snapshot gives a precise identity to compare.[1]

Match source, destination and ancestry explicitly

Your local branch can point to C while a remote branch points to B. For an ordinary branch push to update B to C, the destination must accept that update, commonly including fast-forward ancestry. The local pointer alone does not update the remote. See fast-forward checks.

Local topic=C
Remote topic=B
If B is an ancestor of C and policy allows, push advances remote topic to C
A protected target can reject an authorized user's push under branch rules

Verify the remote marker that users actually depend on

Pushing one topic does not imply a different deployment branch changed. Read the server's reported destination and compare its tip to the expected commit. For a running service, verify the deployment revision independently.

References

  1. Scott Chacon and Ben Straub, Pro Git ↩