Search code examples
gitgit-pullgit-head

What HEAD operations happen upon a git pull?


When I do git fetch origin main I get:

From github.com:company/app-ios
 * branch                main       -> FETCH_HEAD

However when I do git pull main I don't get any mention of ORIG_HEAD or MERGE_HEAD

Since git pull does a merge, then should I expect ORIG_HEAD, MERGE_HEAD to change as well?


Solution

  • The merge succeeded. So MERGE_HEAD no longer exists. It exists only during a merge.

    And merge is not dangerous so ORIG_HEAD was unused. It is set only as part of something dangerous like a hard reset, where the old head would otherwise have no reference.