Efficient way to compile each commit locally

I often want to break my new code into several commits. I also want to check that each compilation command.

Is there any effective way to locally ensure that each compilation commit without the need to add, compile, and save data through each?

+4
source share
1 answer

You can pre-commit Git Hook to make sure that all the code you are trying to execute can compile.

There are some samples listed in the .git / hooks folder of your repository.

Further information on Git Hooks can be found here .

+3

Source: https://habr.com/ru/post/1655959/


All Articles