What do these arguments mean in the "git-checkout" command?

4

I have the following command in Git to retrieve a file:

git checkout (hash-commit)^  --(caminho-arquivo)

In this command what does ^ and -- mean?

    
asked by anonymous 23.04.2018 / 15:11

1 answer

7

The ^ indicates that you want commit a level above this specified. It is the same as ^1 , if you wanted 2 levels above you would use ^2 .

The -- indicates that you will pass a subcommand, an argument of what you will do with the main command.

    
23.04.2018 / 15:19