What does the caret (^) character mean?

前端 未结 8 903
广开言路
广开言路 2020-11-29 17:24

I saw an answer to a question here that helps restore a deleted file in git.

The solution was

git checkout ^ -- 

        
8条回答
  •  -上瘾入骨i
    2020-11-29 18:16

    The caret refers to the parent of a particular commit. E.g. HEAD^ refers to the parent of the current HEAD commmit. (also, HEAD^^ refers to the grandparent).

提交回复
热议问题