Jurasic
Jurasic

Reputation: 1956

git history of fetches

Is there any way to see history of execution git fetch (update from remote) command?
For example:
01 Jan fetched from sha: 01abcdf to sha: bdf412

I have regression in my code and I know time when this regression is not present.
My git graph is straight, so I thought, if will know my fetch history I can easily detect commit that brings this regression.

Upvotes: 0

Views: 87

Answers (2)

jmruc
jmruc

Reputation: 5836

There is no such log (for fetching) to my knowledge, but there are other ways to find when the bug was introduced.

  1. Use git rev-list to see which commits you actually checked out (this is different than simply fetching).
  2. If that does not help, use git bisect, which is a more powerful and complicated tool. It will make it easier to go through the commits, until you find the one that is broken.

Upvotes: 1

Intrepidd
Intrepidd

Reputation: 20878

If you want to detect where a regression came from, use git bisect

git bisect does a dichotomy search, you have to specify a good and a bad hash, it will then jump to revisions and ask you if the commit is good or bad.

git bisect start
git bisect good SOME_HASH
git bisect bad SOME_OTHER_HASH
# Git will jump to a revision and let you test
git bisect good # Or bad, depending on if the bug is still here
git bisect bad ...
# And so on

Upvotes: 4

Related Questions