Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading