You can use git bisect
to search for the first commit that cause an error or something.
git bisect start
I’ve published a video about it you can view it from here
https://www.youtube.com/watch?ab_channel=ZeyadEtman&v=bkxvSQ0WMuE”
More details on Git Documentation.