0

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.

4

2 に答える 2

4

回帰がどこから来たのかを検出したい場合は、git bisect

git bisectは二分法の検索を行います。良いハッシュと悪いハッシュを指定する必要があります。その後、リビジョンにジャンプして、コミットが良いか悪いかを尋ねます。

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
于 2013-02-06T15:26:29.883 に答える
1

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.
于 2013-02-06T15:32:06.767 に答える