Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/joomla/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使angular项目与GitHub保持同步?_Angular_Git_Github - Fatal编程技术网

如何使angular项目与GitHub保持同步?

如何使angular项目与GitHub保持同步?,angular,git,github,Angular,Git,Github,我所知道的是,我们必须在每次提交之前进行“ng构建”。但是有没有更好的方法来实现这一点呢?你可以使用一个 为此,请将名为pre-commit的文件放在git存储库中的.git/hooks目录中。在该文件中,您可以编写一个脚本来运行构建,并且每次尝试提交时都会在提交之前运行该脚本。使用git fetch和git pull为什么要在提交之前执行构建?你想通过这种方式达到什么目的?

我所知道的是,我们必须在每次提交之前进行“ng构建”。但是有没有更好的方法来实现这一点呢?

你可以使用一个


为此,请将名为
pre-commit
的文件放在git存储库中的
.git/hooks
目录中。在该文件中,您可以编写一个脚本来运行构建,并且每次尝试提交时都会在提交之前运行该脚本。

使用
git fetch
git pull
为什么要在提交之前执行构建?你想通过这种方式达到什么目的?