检测网络应用中的git变化?

I am wondering how services like Laravel Forge, and similar types of services automatically detect code changes.

  • Do they check out a bare repo and keep running git fetch until they get new commits?
  • Do they run git remote update over and over again?

It seems like running git remote update or something like that every 15 seconds would be the only way to do this? Am I missing something.

Running git fetch in a loop is a common way to achieve this. .git/FETCH_HEAD can then be examined to find out what was fetched.