What does this command mean in git " "?

Asked

Viewed 154 times

4

I don’t like using commands without knowing the meaning, so would someone tell me what this command means in git: ^ ?

  • An example to help, I found this command to recover file, but I don’t know what the " means: git checkout <hash_commit> -- <path_file>

  • 2

    It’s a kind of "denial"

1 answer

3


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

for example:

git show <branch>^

Displays the differences between your copy and the parent commit

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

git show <branch>^^

and so it adds up ^ to get back on the tree

for an official reference, visit this link

Browser other questions tagged

You are not signed in. Login or sign up in order to post.