When you found a bug and want to identify which commit you produced the bug, you can check out commit and check π
Check commit ids
$ git log --graph --decorate --pretty=oneline --abbrev-commit
Creating an alias if you like π
Git - Git Aliases
Checkout commit and check
$ git checkout {commit id}
Go back to the latest commit
git checkout {branch name}
Note
Having a nice commit message helps spot the respective commits π
Top comments (2)
Check also
git bisect
it automatically and efficiently checks out commits using binary search to find the bug: riptutorial.com/git/example/2670/b....
@bonnev Thanks a lot for sharing
git bisect
! This is TIL for me β¨