Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I tell when a given commit went into a branch?

Tags:

git

I'm trying to find the origin of a bug in our code base. I have the SHA of a commit that I suspect caused the breakage, but I also know the date where the bug started to appear. I want to check when a given commit was merged into our main branch.

Is there an easy way to do that?

like image 709
Swaraj Avatar asked Jan 13 '23 06:01

Swaraj


1 Answers

git bisect should help you locate the bug quite nicely.

https://www.kernel.org/pub/software/scm/git/docs/git-bisect.html

http://git-scm.com/book/en/Git-Tools-Debugging-with-Git#Binary-Search

As for the commit SHA you are targeting, just run git log on it, and it will tell you all about the commit (date, author, etc.). Run git log -p on it to see what changes that commit made.

like image 60
TheBuzzSaw Avatar answered Jan 18 '23 22:01

TheBuzzSaw