How to use nodejs to passively pull items from git?

  node.js, question

The company is working on a project that requires nodejs to pull the project passively from the git, that is, if the code on the git has been updated (colleagues have submitted the code), it will send a message to nodejs. nodejs will pull and update the local file from the git after listening to the message. In fact, instead of manually pulling the code, it will get the Nodegit plug-in used by the GIT. I hope you can give some suggestions, thank you!

This kind of thing has never been done before, but it seems that this idea of yours is of no great use. It’s an attempt to gild the lily. For example, when you are writing code and your colleague submits it, your side passively updates the code. If there is a conflict, you must stop to deal with the conflict and your thinking will be broken. Also, many projects are now under branch management. Even if colleagues submit them, they are not necessarily on your branch. It is useless for you to update them.
For this idea, you can use a similar mobile phone push. When the server detects the code update, it pushes it to the client. The client has scripts to receive the push and send the request update code. That’s all I can think of, but the idea really doesn’t work. It shouldn’t take longer to update the code manually than it takes you to develop this feature.