HEAD and ORIG_HEAD in Git

前端 未结 4 1825
借酒劲吻你
借酒劲吻你 2020-11-22 02:25

What do these symbols refer to and what do they mean?

(I can\'t find any explanation in official documentation)

4条回答
  •  没有蜡笔的小新
    2020-11-22 02:41

    From man 7 gitrevisions:

    HEAD names the commit on which you based the changes in the working tree. FETCH_HEAD records the branch which you fetched from a remote repository with your last git fetch invocation. ORIG_HEAD is created by commands that move your HEAD in a drastic way, to record the position of the HEAD before their operation, so that you can easily change the tip of the branch back to the state before you ran them. MERGE_HEAD records the commit(s) which you are merging into your branch when you run git merge. CHERRY_PICK_HEAD records the commit which you are cherry-picking when you run git cherry-pick.

提交回复
热议问题