Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Read git changed files with nodejs

Tags:

git

node.js

pull

I'm new with nodeJS and have to create a scheduler to list the files that have been changed in a git pull. My question is: Which module/lib/way is better for this?

like image 482
RdLG Avatar asked Feb 28 '26 15:02

RdLG


1 Answers

You can use the child process module that's built in with Node.js: https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback

With that you can execute a Git command and parse the output yourself.

like image 165
Mr EdgarP Avatar answered Mar 02 '26 04:03

Mr EdgarP



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!