Git - Determine when a revision was pulled/fetched/merged at this site
Frage
I know when certain commits were created (at remote A, say) based on their log messages. What I don't know is when remote B fetched and merged said revision. I need it to determine when a bug crept in.
Is this possible through Git?
Lösung
If this is fetch
, try git reflog --date=local
, see https://stackoverflow.com/a/3748722/88442 .
if it have a local merge, a git log would do.
Andere Tipps
Assuming that you have fetched the remote, you can simply check what branches on the remote contain the commit by doing:
git branch -r --contains <commit-SHA> | grep origin
You'll see the branches on the remote (change origin
to the appropriate name) that contain the commit, or no output if none.
Logs are kept in ".git/logs". You're probably interested in ".git/logs/HEAD" on the checkout you're interested in. These logs contain pulls, checkouts, commits, etc., along with the time they occurred.