开发者

git - date at which commits were pulled into repository

开发者 https://www.devze.com 2023-03-07 07:31 出处:网络
I know from my server logs that an error first starts appearing at a certain time many da开发者_开发百科ys ago.

I know from my server logs that an error first starts appearing at a certain time many da开发者_开发百科ys ago.

To deploy, I issue a git pull on my server. I want to find out what commits were pulled around the time the errors started to show up.

Looking at the logs, the <author date> and <committer date> both give the same date across all repositories (as you'd expect), and they relate to when the commit was committed to git (in the development repository), not when it appeared in the deployment repository.

Any idea if it's possible to tease out this info from git?


Try this:

git reflog show master@{2.weeks.ago}


I too want to know a good answer for this, but one thing I can suggest is, get the hash of a commit, go to .git/objects/xx/remaininghash and see the date at which it was created?

I am not directly answering your question, but you can also use git bisect to narrow down which commit caused the problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号