What does the caret (^) character mean?

前端 未结 8 937
广开言路
广开言路 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条回答
  •  青春惊慌失措
    2020-11-29 18:14

    The carat represents a commit offset (parent). So for instance, HEAD^ means "one commit from HEAD" and HEAD^^^ means "three commits from HEAD".

提交回复
热议问题