gitdescribe

Meaning of ^ in git describe command


I'm reading through documentation about git describe command. Here https://git-scm.com/docs/git-describe

Under EXAMPLES I see a command

$ git describe --all --abbrev=4 v1.0.5^2

I was wondering what is the meaning of ^ in v1.0.5^2 and what is the meaning of v1.0.5^2.

Thanks


Solution

  • ^2 means the second parent. In this case the second parent of v1.0.5. If you write v1.0.5^, it would mean it's the first parent.