我有一个Web应用程序项目,其中包含一个带有PHP API REST的文件夹和另一个包含Angular文件的文件夹。 当我想将我的文件提交到BitBucket时,我可以提交除Angular文件夹下的文件以外的所有文件。
在SourceTree上也是如此,我在这个文件夹下看不到任何变化。 Angular是否正在使用“ng new angular-app”强制执行这种行为? 我怎样才能解决这个问题 ?
I have a web app project with a folder with a PHP API REST and another folder containing Angular files. When I want to commit my files to BitBucket, I can commit all except the files under the Angular folder.
Same thing on SourceTree, I can't see any changes under this folder. Is there a thing Angular is doing on "ng new angular-app" to force this behaviour ? How can I fix this ?
最满意答案
在Matt的帮助下,我找到了如何解决我的问题:由于我看不到隐藏的文件,我没有看到Angular CLI在angular app文件夹中创建了一个.git文件夹。 我删除了它,现在它正在工作。
对于未来的应用程序,如果我们不希望Angular初始化git repo,我们可以在创建命令中指定它,如下所示: ng new --skip-git
With the help of Matt, I found how to solve my issue : As I couldn't see hidden files, I didn't see that Angular CLI created a .git folder in the angular app folder. I removed it, and now It's working.
For future apps, if we don't want Angular to initialize a git repo, we can specify it on the creation command like this : ng new --skip-git
更多推荐
发布评论