Why is there a difference between "git log r1..r2" and "git log ^r1 r2"

I’m using Git on Windows version 2.36.1.windows.1.

According to the reference pages on git revisions the following two commands are identical:

git log r1..r2
git log ^r1 r2

But when I run these commands I get different results. The two-dot notation gives me the commits I expect, but the caret notation returns me all the commits back to the first commit in the repository.

Is this expected? Am I reading the documentation wrong?

>Solution :

If you are running these command in Command Prompt, you need to escape the carret (^):

git log r1..r2
git log ^^r1 r2

Leave a Reply