Document

SUBSCRIBE TO GET FULL ACCESS TO THE E-BOOKS FOR FREE 🎁SUBSCRIBE NOW

Professional Dropdown with Icon

SUBSCRIBE NOW TO GET FREE ACCESS TO EBOOKS

Git - diff command

git diff command

This command is used to display the difference between 2 commits.

Example

Find the commits by running below command

git log –oneline

Now to check the difference of data between 2 commits

 git diff 7357bd5 4200608

Output 

diff –git a/package.json b/package.json

index 846c681..e69de29 100644

— a/package.json

+++ b/package.json

@@ -1 +0,0 @@

Above output clearly shows that one line is missing in second commit.

Share your love

Leave a Reply

Your email address will not be published. Required fields are marked *