-1

At some point in time my project was perfectly working and commit was made. After several days a change happened and suddenly it stopped to work. How can I use git to compare the changes between to commits?

Thanks!

Dmitry
  • 6,716
  • 14
  • 37
  • 39
orthehelper
  • 4,009
  • 10
  • 40
  • 67

1 Answers1

1
  1. Do git log and find the approximate date you think the project was working fine.
  2. Find the SHA of the commits around that date and find their diff by doing:

    git diff <SHA of commit1> <SHA of commit2>
    
  3. To compare the changes in a specific filename do:

    git diff <SHA of commit1> <SHA of commit2> /path/to/filename/in/repo
    
Vikram Hosakote
  • 3,528
  • 12
  • 23