What does this command mean in git "^"?

4

I do not like to be using commands without knowing the meaning, so could anyone tell me what this command means in git: ^ ?

    
asked by anonymous 26.02.2018 / 18:24

1 answer

3

Imagine that you wanted to see the difference of your current directory with the "parent" commit, you use ^

For example:

git show <branch>^

Displays the differences between your copy and the parent commit

And if you want to see the difference between "grandfather", you can

git show <branch>^^

and so adding ^ to return to the tree

For an official reference, visit this link

    
12.03.2018 / 19:09