1

I have a project in swift and I use git flow. I found a bug in my project, but I don't know when and where it was introduced in my commit history. how can I find the bug in my commit history? Is there any tools to search in commits?

Dávid Pásztor
  • 51,403
  • 9
  • 85
  • 116
Negar
  • 91
  • 6
  • 4
    Try `git bisect` ? – Jiří Baum Oct 13 '21 at 09:23
  • 1
    Bisect/Binary search. But you'd have to "tried" each time to see if the bug is present... Or if you know where it is (know the modification/file), XCode and its git diff/time travel can show you the commit: https://stackoverflow.com/questions/69272090/where-is-the-xcode-side-by-side-code-comparison-option/69272179#69272179 – Larme Oct 13 '21 at 09:24

1 Answers1

1

you can use this code on your terminal:

git bisect start

this will show you the broken version branch and info for debugging there is a good doc for this job https://git-scm.com/docs/git-bisect