onMessage
The clone
, fetch
, push
, and pull
commands all accept an onMessage
callback.
Message events are for messages generated by the remote server and sent during fetch
and push
requests.
They are particularly useful if the remote server has custom git-hooks that print to the console.
Usage Example:
You are writing a console application, and you want to simply print any server messages to standard out.
const git = require('isomorphic-git')
git.clone({
...,
onMessage: console.log
})