Steven
Steven

Reputation: 13995

Detect git changes in web app?

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

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.

Upvotes: 0

Views: 128

Answers (1)

jsageryd
jsageryd

Reputation: 4643

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.

Upvotes: 1

Related Questions