简体   繁体   中英

How do I see git log in the order the changes arrived at my machine not when they were committed?

Maybe a dumb question but:

Something broke my build after a git pull. I check the logs and nothing has changed since my last build! Der, lots of stuff has changed but it changed 6 months ago and has only just been pushed to the remote repository. So looking at the log it's buried way down past the date of my last (good) build.

How do I see a log of what has changed since my last pull? Or has been pushed since a given date? I don't care when it was changed or when it was committed. I do care when it turned up in my build tree and when it was pushed into my current branch of the remote repos.

I've looked at Git and log order but that doesn't seem to be the same question so kicking off a new one.

You don't need to view the log ordered by date, you need to find when did the problem begun.

To do so you can use any of the followings:

  1. You can use git reflog to view your local git history and determine whats went wrong and from which point.

It will print out the commit log so you will be able to trace your whole git pull history.

it will look something like:

c37166e HEAD@{0}: pull: Fast-forward
95d26a4 HEAD@{1}: pull: Fast-forward
....
5ec6544 HEAD@{n}: checkout .... (or whatever was before)

once you find out the exact point when all went wrong, checkout the branch at this point and compare it to your last good state.


  1. use git bisect

git bisect will "find" the exact point in the commit log when all the troubles begun.

Git bisect is very simple to use. here is a very detailed answer about git bisect

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM