-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,196
  • 14
  • 37
  • 37
or azran
  • 3,999
  • 10
  • 36
  • 65

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,140
  • 9
  • 22