0

I want to create a custom script in my package.json that will perform the following actions:

  1. git init and git add .
  2. prompt the user for a commit message from the terminal, if the user enters an input, that input will be used as a commit message and the commit will be executed. If the user presses enter, the a default commit message will be used to execute the commit
  3. pull from the remote origin after committing then start the server.

The essence is to automate a process of pulling changes regularly from the remote before making new changes when working in development mode

1 Answer 1

0

I was able to do this using simple-git, an npm package. Check it out at Simple git

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.