const { exec } = require('child_process'); exec('git pull', (err, stdout, stderr) => { // handle err, stdout & stderr });