Search code examples
githubcommit

Are there different names or references for commits?


I cannot find the answers to these 3 questions:

  • HEAD - the name for the last commit of a branch
  • ???? - the name for the last commit that came from the remote repository
  • ???? - the name for the last commit before a merge was started

I've looked at https://www.kernel.org/pub/software/scm/git/docs/gitglossary.html


Solution

  • From the git revisions documentation:

    • HEAD - The name for the last commit of a branch

    HEAD names the commit on which you based the changes in the working tree.

    • ??? - the name for the last commit before a merge was started

    MERGE_HEAD records the commit(s) which you are merging into your branch when you run git merge

    • ??? - the name for the last commit that came from the remote repository

    FETCH_HEAD records the branch which you fetched from a remote repository with your last git fetch invocation