A
A
anttoshka2018-06-09 13:28:29
git
anttoshka, 2018-06-09 13:28:29

How to run gulp task on commit so that changed files get into the same commit?

The bottom line is that there are several projects in which it is necessary that when committing, a gallp task is launched that creates the collected js and css. In the git, you need to store js and css collected by certain tasks.
Now I'm trying to run the necessary tasks in pre-commit, but the finished files do not get into the same commit.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SagePtr, 2018-06-09
@SagePtr

It is necessary to add freshly created files at the end of the pre-commit hook (via git add for example), then they will be included in the commit.
But in general, this is a bad idea, it is better to store only source files in the version control system, and collect them during deployment.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question